Commit ee9f3679 authored by antirez's avatar antirez
Browse files

Fixed a bug in the average latency metering of redis-cli --latency

parent 28de624c
...@@ -762,6 +762,7 @@ static void latencyMode(void) { ...@@ -762,6 +762,7 @@ static void latencyMode(void) {
} else { } else {
if (latency < min) min = latency; if (latency < min) min = latency;
if (latency > max) max = latency; if (latency > max) max = latency;
tot += latency;
avg = (double) tot/count; avg = (double) tot/count;
} }
printf("\x1b[0G\x1b[2Kmin: %lld, max: %lld, avg: %.2f (%lld samples)", printf("\x1b[0G\x1b[2Kmin: %lld, max: %lld, avg: %.2f (%lld samples)",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment