diff options
author | antirez <antirez@gmail.com> | 2011-09-15 19:32:25 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2011-09-21 18:10:07 +0200 |
commit | ee9f3679a951bd3f5c17243963d8a23bdf4fccaf (patch) | |
tree | 5f7f2e0a2c508fd4297a09891e7afadd5455f4d6 | |
parent | 28de624c7005f0f03ea65e937927fe599942801e (diff) | |
download | redis-ee9f3679a951bd3f5c17243963d8a23bdf4fccaf.tar.gz |
Fixed a bug in the average latency metering of redis-cli --latency
-rw-r--r-- | src/redis-cli.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c index 5091160a7..4a7d855d2 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -762,6 +762,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)", |