]> git.saurik.com Git - redis.git/commitdiff
Fixed a bug in the average latency metering of redis-cli --latency
authorantirez <antirez@gmail.com>
Thu, 15 Sep 2011 17:32:25 +0000 (19:32 +0200)
committerantirez <antirez@gmail.com>
Thu, 15 Sep 2011 17:33:24 +0000 (19:33 +0200)
src/redis-cli.c

index 3bda064ce45538ec51453e9d5e40757596882fd5..328cd3df207e1561e2e5f9bc3e517b75c94b9534 100644 (file)
@@ -765,6 +765,7 @@ static void latencyMode(void) {
         } else {
             if (latency < min) min = latency;
             if (latency > max) max = latency;
+            tot += latency;
             avg = (double) tot/count;
         }
         printf("\x1b[0G\x1b[2Kmin: %lld, max: %lld, avg: %.2f (%lld samples)",