benchResult_t changed to double

This commit is contained in:
inikep 2016-03-14 13:13:42 +01:00
parent 4e26bb69c7
commit c034b73f8f

View File

@ -215,10 +215,10 @@ typedef struct
typedef struct typedef struct
{ {
float ratio; double ratio;
size_t cSize; size_t cSize;
float cSpeed; double cSpeed;
float dSpeed; double dSpeed;
} benchResult_t; } benchResult_t;
@ -425,7 +425,8 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize,
if (cLevel < 0) { if (cLevel < 0) {
int l; int l;
memset(&total, 0, sizeof(total)); 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 (pch) displayName = pch+1;
if (g_displayLevel == 1) if (g_displayLevel == 1)
@ -437,7 +438,7 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize,
fileSizes, nbFiles, fileSizes, nbFiles,
dictBuffer, dictBufferSize, &result); dictBuffer, dictBufferSize, &result);
if (g_displayLevel == 1) { 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.cSize += result.cSize;
total.cSpeed += result.cSpeed; total.cSpeed += result.cSpeed;
total.dSpeed += result.dSpeed; total.dSpeed += result.dSpeed;
@ -450,7 +451,7 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize,
total.cSpeed /= -cLevel; total.cSpeed /= -cLevel;
total.dSpeed /= -cLevel; total.dSpeed /= -cLevel;
total.ratio /= -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; return;
} }