minor: fixed zlib wrapper internal benchmark

another possibility could be to link it to programs/benchfn .
Not worth the effort.
This commit is contained in:
Yann Collet
2023-03-06 12:20:06 -08:00
parent db79219f70
commit 9efc14804e
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
#include "fileio.h" /* stdinmark, stdoutmark, ZSTD_EXTENSION */ #include "fileio.h" /* stdinmark, stdoutmark, ZSTD_EXTENSION */
#ifndef ZSTD_NOBENCH #ifndef ZSTD_NOBENCH
# include "benchzstd.h" /* BMK_benchFiles */ # include "benchzstd.h" /* BMK_benchFilesAdvanced */
#endif #endif
#ifndef ZSTD_NODICT #ifndef ZSTD_NODICT
# include "dibio.h" /* ZDICT_cover_params_t, DiB_trainFromFiles() */ # include "dibio.h" /* ZDICT_cover_params_t, DiB_trainFromFiles() */
+6 -6
View File
@@ -26,7 +26,7 @@
#include "datagen.h" /* RDG_genBuffer */ #include "datagen.h" /* RDG_genBuffer */
#include "xxhash.h" #include "xxhash.h"
#include "zstd_zlibwrapper.h" #include "../zstd_zlibwrapper.h"
@@ -109,17 +109,17 @@ static unsigned g_nbIterations = NBLOOPS;
static size_t g_blockSize = 0; static size_t g_blockSize = 0;
int g_additionalParam = 0; int g_additionalParam = 0;
void BMK_setNotificationLevel(unsigned level) { g_displayLevel=level; } static void BMK_setNotificationLevel(unsigned level) { g_displayLevel=level; }
void BMK_setAdditionalParam(int additionalParam) { g_additionalParam=additionalParam; } static void BMK_setAdditionalParam(int additionalParam) { g_additionalParam=additionalParam; }
void BMK_SetNbIterations(unsigned nbLoops) static void BMK_SetNbIterations(unsigned nbLoops)
{ {
g_nbIterations = nbLoops; g_nbIterations = nbLoops;
DISPLAYLEVEL(3, "- test >= %u seconds per compression / decompression -\n", g_nbIterations); DISPLAYLEVEL(3, "- test >= %u seconds per compression / decompression -\n", g_nbIterations);
} }
void BMK_SetBlockSize(size_t blockSize) static void BMK_SetBlockSize(size_t blockSize)
{ {
g_blockSize = blockSize; g_blockSize = blockSize;
DISPLAYLEVEL(2, "using blocks of size %u KB \n", (unsigned)(blockSize>>10)); DISPLAYLEVEL(2, "using blocks of size %u KB \n", (unsigned)(blockSize>>10));
@@ -798,7 +798,7 @@ static void BMK_syntheticTest(int cLevel, int cLevelLast, double compressibility
} }
int BMK_benchFiles(const char** fileNamesTable, unsigned nbFiles, static int BMK_benchFiles(const char** fileNamesTable, unsigned nbFiles,
const char* dictFileName, int cLevel, int cLevelLast) const char* dictFileName, int cLevel, int cLevelLast)
{ {
double const compressibility = (double)g_compressibilityDefault / 100; double const compressibility = (double)g_compressibilityDefault / 100;