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

This commit is contained in:
antirez 2011-09-15 19:32:25 +02:00
parent 43071993e1
commit 96674b6d95

View 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)",