Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ee9f3679
Commit
ee9f3679
authored
Sep 15, 2011
by
antirez
Browse files
Fixed a bug in the average latency metering of redis-cli --latency
parent
28de624c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
ee9f3679
...
@@ -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)"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment