Benchmark: fix reporting of base10

This commit is contained in:
Sean Parkinson
2023-03-27 16:29:47 +10:00
parent 979707380c
commit 5f2208e71d

View File

@@ -1665,8 +1665,8 @@ static WC_INLINE int bench_stats_check(double start)
return ((current_time(0) - start) < BENCH_MIN_RUNTIME_SEC);
}
/* return text for units and scale the value of blocks as needed for base2 */
static const char* get_blocktype_base10(double* blocks)
/* return text for units and scale the value of blocks as needed */
static const char* get_blocktype(double* blocks)
{
const char* rt;
@@ -1674,7 +1674,7 @@ static const char* get_blocktype_base10(double* blocks)
defined(WOLFSSL_BENCHMARK_FIXED_UNITS_GB))
#undef WOLFSSL_FIXED_UNITS_PER_SEC
#define WOLFSSL_FIXED_UNITS_PER_SEC "GB/s"
*blocks /= (1000UL * 1000UL * 1000UL);
*blocks /= (1024UL * 1024UL * 1024UL);
rt = "GiB";
#elif (defined(WOLFSSL_BENCHMARK_FIXED_UNITS_M) || \
defined(WOLFSSL_BENCHMARK_FIXED_UNITS_MB))
@@ -1712,8 +1712,8 @@ static const char* get_blocktype_base10(double* blocks)
return rt;
}
/* return text for units and scale the value of blocks as needed */
static const char* get_blocktype(double* blocks)
/* return text for units and scale the value of blocks as needed for base2 */
static const char* get_blocktype_base10(double* blocks)
{
const char* rt;