Incremental Display + Fn Separations

Seperate syntheticTest and fileTableTest (now renamed as benchFiles)
Add incremental display to benchMem
Change to only iterMode for benchFunction
Make Synthetic test's compressibility configurable from cli (using -P#)
This commit is contained in:
George Lu
2018-06-21 16:23:18 -07:00
parent a3c8b59990
commit a8eea99ebe
4 changed files with 326 additions and 219 deletions
+8 -8
View File
@@ -291,6 +291,8 @@ static size_t benchMem(const void* src, size_t srcSize, U32 benchNb)
void* buff2;
const char* benchName;
size_t (*benchFunction)(const void* src, size_t srcSize, void* dst, size_t dstSize, void* verifBuff);
BMK_customReturn_t r;
int errorcode = 0;
/* Selection */
switch(benchNb)
@@ -427,15 +429,13 @@ static size_t benchMem(const void* src, size_t srcSize, U32 benchNb)
/* benchmark loop */
{
BMK_customReturn_t r = BMK_benchFunction(
benchFunction, buff2,
NULL, NULL,
1, &src, &srcSize,
(void * const * const)&dstBuff, &dstBuffSize,
BMK_timeMode, 1);
r = BMK_benchFunction(benchFunction, buff2,
NULL, NULL, 1, &src, &srcSize,
(void * const * const)&dstBuff, &dstBuffSize, g_nbIterations);
if(r.error) {
DISPLAY("ERROR %d ! ! \n", r.error);
exit(1);
errorcode = r.error;
goto _cleanOut;
}
DISPLAY("%2u#Speed: %f MB/s - Size: %f MB - %s\n", benchNb, (double)srcSize / r.result.nanoSecPerRun * 1000, (double)r.result.sumOfReturn / 1000000, benchName);
@@ -448,7 +448,7 @@ _cleanOut:
ZSTD_freeDCtx(g_zdc); g_zdc=NULL;
ZSTD_freeCStream(g_cstream); g_cstream=NULL;
ZSTD_freeDStream(g_dstream); g_dstream=NULL;
return 0;
return errorcode;
}