]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
add tests for compression bounds, fix another warning
authorPaul Cruz <paulcruz74@fb.com>
Fri, 28 Jul 2017 22:55:02 +0000 (15:55 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Fri, 28 Jul 2017 22:55:02 +0000 (15:55 -0700)
contrib/adaptive-compression/adapt.c
contrib/adaptive-compression/test-correctness.sh

index 5e26a0db661a7b437cfae2f9c73dfee7b2b051b7..55f4148fbea17a3a68f9f6375591e9a244baa094 100644 (file)
@@ -621,10 +621,11 @@ static void* compressionThread(void* arg)
 
 static void displayProgress(unsigned cLevel, unsigned last)
 {
+
+    UTIL_time_t currTime;
+    UTIL_getTime(&currTime);
     if (!g_useProgressBar) return;
     {
-        UTIL_time_t currTime;
-        UTIL_getTime(&currTime);
         double const timeElapsed = (double)(UTIL_getSpanTimeMicro(g_ticksPerSecond, g_startTime, currTime) / 1000.0);
         double const sizeMB = (double)g_streamedSize / (1 << 20);
         double const avgCompRate = sizeMB * 1000 / timeElapsed;
index 8ae6604af25076960a276f747b79b14b083b1141..3bea867b9cc7086fd3083e1abf1922416e5d9fb0 100755 (executable)
@@ -242,4 +242,11 @@ echo -e "\ncorrectness tests -- window size test"
 ./datagen -s39 -g1GB | pv -L 25m -q | ./adapt -i1 | pv -q > tmp.zst
 zstd -d tmp.zst
 rm tmp*
+
+echo -e "\ncorrectness tests -- testing bounds"
+./datagen -s40 -g1GB | pv -L 25m -q | ./adapt -i1 -u4 | pv -q > tmp.zst
+rm tmp*
+
+./datagen -s41 -g1GB | ./adapt -i14 -l4 > tmp.zst
+rm tmp*
 make clean