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
0dcc754f
Commit
0dcc754f
authored
Jul 10, 2014
by
antirez
Browse files
LATENCY HISTORY returns empty array if no data is available.
Previously we returned an error.
parent
79d2f70f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/latency.c
View file @
0dcc754f
...
...
@@ -524,8 +524,11 @@ void latencyCommand(redisClient *c) {
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"history"
)
&&
c
->
argc
==
3
)
{
/* LATENCY HISTORY <event> */
ts
=
dictFetchValue
(
server
.
latency_events
,
c
->
argv
[
2
]
->
ptr
);
if
(
ts
==
NULL
)
goto
nodataerr
;
latencyCommandReplyWithSamples
(
c
,
ts
);
if
(
ts
==
NULL
)
{
addReplyMultiBulkLen
(
c
,
0
);
}
else
{
latencyCommandReplyWithSamples
(
c
,
ts
);
}
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"graph"
)
&&
c
->
argc
==
3
)
{
/* LATENCY GRAPH <event> */
sds
graph
;
...
...
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