From c034b73f8f15f6794e0ccf65d3ab4469b8d1fd65 Mon Sep 17 00:00:00 2001 From: inikep Date: Mon, 14 Mar 2016 13:13:42 +0100 Subject: [PATCH] benchResult_t changed to double --- programs/bench.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/programs/bench.c b/programs/bench.c index 811e1779..13ec3106 100644 --- a/programs/bench.c +++ b/programs/bench.c @@ -215,10 +215,10 @@ typedef struct typedef struct { - float ratio; + double ratio; size_t cSize; - float cSpeed; - float dSpeed; + double cSpeed; + double dSpeed; } benchResult_t; @@ -425,7 +425,8 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize, if (cLevel < 0) { int l; memset(&total, 0, sizeof(total)); - char* pch = strrchr(displayName, '\\'); + char* pch = strrchr(displayName, '\\'); /* Windows */ + if (!pch) pch = strrchr(displayName, '/'); /* Linux */ if (pch) displayName = pch+1; if (g_displayLevel == 1) @@ -437,7 +438,7 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize, fileSizes, nbFiles, dictBuffer, dictBufferSize, &result); if (g_displayLevel == 1) { - DISPLAY("%2i:%11i (%5.3f),%6.1f MB/s,%6.1f MB/s, %s\n", -l, (int)result.cSize, result.ratio, result.cSpeed, result.dSpeed, displayName); + DISPLAY("%-3i%11i (%5.3f) %6.1f MB/s %6.1f MB/s %s\n", -l, (int)result.cSize, result.ratio, result.cSpeed, result.dSpeed, displayName); total.cSize += result.cSize; total.cSpeed += result.cSpeed; total.dSpeed += result.dSpeed; @@ -450,7 +451,7 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize, total.cSpeed /= -cLevel; total.dSpeed /= -cLevel; total.ratio /= -cLevel; - DISPLAY("avg%11i (%5.3f),%6.1f MB/s,%6.1f MB/s, %s\n", (int)total.cSize, total.ratio, total.cSpeed, total.dSpeed, displayName); + DISPLAY("avg%11i (%5.3f) %6.1f MB/s %6.1f MB/s %s\n", (int)total.cSize, total.ratio, total.cSpeed, total.dSpeed, displayName); } return; }