]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
minor: fixed zlib wrapper internal benchmark
authorYann Collet <cyan@fb.com>
Mon, 6 Mar 2023 20:20:06 +0000 (12:20 -0800)
committerYann Collet <cyan@fb.com>
Mon, 6 Mar 2023 20:20:06 +0000 (12:20 -0800)
another possibility could be to link it to programs/benchfn .
Not worth the effort.

programs/zstdcli.c
zlibWrapper/examples/zwrapbench.c

index 7f470cc6922caa8ad3c38ff506a53928ead82410..38350eb7045f3cabd5d7cc691ef4a96c727290c5 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "fileio.h"   /* stdinmark, stdoutmark, ZSTD_EXTENSION */
 #ifndef ZSTD_NOBENCH
-#  include "benchzstd.h"  /* BMK_benchFiles */
+#  include "benchzstd.h"  /* BMK_benchFilesAdvanced */
 #endif
 #ifndef ZSTD_NODICT
 #  include "dibio.h"  /* ZDICT_cover_params_t, DiB_trainFromFiles() */
index 3bc9a1ab0b80a8a2e3eecdae880028a235cc55d1..33dcb2a7339c37402dab6e71b00a9e5dfd101be0 100644 (file)
@@ -26,7 +26,7 @@
 #include "datagen.h"     /* RDG_genBuffer */
 #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;
 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;
     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;
     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)
 {
     double const compressibility = (double)g_compressibilityDefault / 100;