From 425d0b72c3eca5e9e7dbfd914dd78e8d977bea65 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Mon, 26 Dec 2022 20:25:05 -0600 Subject: [PATCH] wolfcrypt/benchmark/benchmark.c: fix bench_stats_sym_finish() in GENERATE_MACHINE_PARSEABLE_REPORT mode to properly render "bytes_total" column in bytes, not the unit selected by WOLFSSL_BENCHMARK_FIXED_UNITS_*. --- wolfcrypt/benchmark/benchmark.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 9f2c3b083..c904902d5 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -1888,14 +1888,12 @@ static void bench_stats_sym_finish(const char* desc, int useDeviceID, #ifdef GENERATE_MACHINE_PARSEABLE_REPORT #ifdef WOLFSSL_ESPIDF - unsigned long bytes_processed = (unsigned long)blocks; + unsigned long bytes_processed = + (unsigned long)count * (unsigned long)countSz; #else - word64 bytes_processed = (word64)blocks; + word64 bytes_processed = (word64)count * (word64)countSz; #endif -#endif - -#ifdef GENERATE_MACHINE_PARSEABLE_REPORT /* note this codepath brings in all the fields from the non-CSV case. */ #ifdef WOLFSSL_ESPIDF #ifdef HAVE_GET_CYCLES