Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion programs/benchzstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Tuning parameters
****************************************/
#ifndef BMK_TIMETEST_DEFAULT_S /* default minimum time per test */
#define BMK_TIMETEST_DEFAULT_S 3
# define BMK_TIMETEST_DEFAULT_S 3
#endif


Expand Down Expand Up @@ -387,6 +387,13 @@ BMK_benchMemAdvancedNoAlloc(
RDG_genBuffer(compressedBuffer, maxCompressedSize, 0.10, 0.50, 1);
}

#if defined(UTIL_TIME_USES_C90_CLOCK)
if (adv->nbWorkers > 1) {
OUTPUTLEVEL(2, "Warning : time measurements restricted to C90 clock_t. \n")
OUTPUTLEVEL(2, "Warning : using C90 clock_t leads to incorrect measurements in multithreading mode. \n")
}
#endif

/* Bench */
{ U64 const crcOrig = (adv->mode == BMK_decodeOnly) ? 0 : XXH64(srcBuffer, srcSize, 0);
# define NB_MARKS 4
Expand Down
1 change: 1 addition & 0 deletions programs/timefn.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ extern "C" {

#else /* relies on standard C90 (note : clock_t measurements can be wrong when using multi-threading) */

#define UTIL_TIME_USES_C90_CLOCK
typedef clock_t UTIL_time_t;
#define UTIL_TIME_INITIALIZER 0

Expand Down