bench: minor api update, for consistency

BMK_benchTimedFn()
BMK_isCompleted_TimedFn() uses TimedFnState
This commit is contained in:
Yann Collet
2018-08-26 21:30:18 -07:00
parent c3a4baaf6e
commit 01dcd0fd17
4 changed files with 43 additions and 40 deletions
+4 -4
View File
@@ -1441,7 +1441,7 @@ BMK_benchMemInvertible( buffers_t buf, contexts_t ctx,
dctxprep.dictBufferSize = dictBufferSize;
while(!compressionCompleted) {
BMK_runOutcome_t const cOutcome = BMK_benchFunctionTimed(timeStateCompress,
BMK_runOutcome_t const cOutcome = BMK_benchTimedFn(timeStateCompress,
&local_defaultCompress, cctx,
&local_initCCtx, &cctxprep,
nbBlocks,
@@ -1461,11 +1461,11 @@ BMK_benchMemInvertible( buffers_t buf, contexts_t ctx,
bResult.cSpeed = (srcSize * TIMELOOP_NANOSEC) / rResult.nanoSecPerRun;
bResult.cSize = rResult.sumOfReturn;
}
compressionCompleted = BMK_isCompleted_runOutcome(cOutcome);
compressionCompleted = BMK_isCompleted_TimedFn(timeStateCompress);
}
while (!decompressionCompleted) {
BMK_runOutcome_t const dOutcome = BMK_benchFunctionTimed(timeStateDecompress,
BMK_runOutcome_t const dOutcome = BMK_benchTimedFn(timeStateDecompress,
&local_defaultDecompress, dctx,
&local_initDCtx, &dctxprep,
nbBlocks,
@@ -1484,7 +1484,7 @@ BMK_benchMemInvertible( buffers_t buf, contexts_t ctx,
{ BMK_runTime_t const rResult = BMK_extract_runTime(dOutcome);
bResult.dSpeed = (srcSize * TIMELOOP_NANOSEC) / rResult.nanoSecPerRun;
}
decompressionCompleted = BMK_isCompleted_runOutcome(dOutcome);
decompressionCompleted = BMK_isCompleted_TimedFn(timeStateDecompress);
}
BMK_freeTimedFnState(timeStateCompress);