summaryrefslogtreecommitdiffstats
path: root/programs/bench.c
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-11-10 15:31:10 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-11-10 15:31:10 (GMT)
commit2278d1f02f74e8cfdb21248ff1ca347efbde53a1 (patch)
tree37fa94e3325b6c066b6c97398b5db23d44dd9817 /programs/bench.c
parentd57d3e4b4d5a95970ee204e2bc31776809ca8c6f (diff)
downloadlz4-2278d1f02f74e8cfdb21248ff1ca347efbde53a1.zip
lz4-2278d1f02f74e8cfdb21248ff1ca347efbde53a1.tar.gz
lz4-2278d1f02f74e8cfdb21248ff1ca347efbde53a1.tar.bz2
custom block size
Diffstat (limited to 'programs/bench.c')
-rw-r--r--programs/bench.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/programs/bench.c b/programs/bench.c
index c493682..cfd60db 100644
--- a/programs/bench.c
+++ b/programs/bench.c
@@ -122,7 +122,6 @@ void BMK_SetNbSeconds(unsigned nbSeconds)
void BMK_SetBlockSize(size_t blockSize)
{
g_blockSize = blockSize;
- DISPLAYLEVEL(2, "using blocks of size %u KB \n", (U32)(blockSize>>10));
}
@@ -494,6 +493,11 @@ int BMK_benchFiles(const char** fileNamesTable, unsigned nbFiles,
{
double const compressibility = (double)g_compressibilityDefault / 100;
+ if (cLevel > LZ4HC_MAX_CLEVEL) cLevel = LZ4HC_MAX_CLEVEL;
+ if (cLevelLast > LZ4HC_MAX_CLEVEL) cLevelLast = LZ4HC_MAX_CLEVEL;
+ if (cLevelLast < cLevel) cLevelLast = cLevel;
+ if (cLevelLast > cLevel) DISPLAYLEVEL(2, "Benchmarking levels from %d to %d\n", cLevel, cLevelLast);
+
if (nbFiles == 0)
BMK_syntheticTest(cLevel, cLevelLast, compressibility);
else