"vscode:/vscode.git/clone" did not exist on "e16dd1d86b84b22d30f22b8b6fef3a60c5861346"
Commit 034f39f1 authored by antirez's avatar antirez
Browse files

LATENCY HISTORY returns empty array if no data is available.

Previously we returned an error.
parent ef7c1fbc
...@@ -524,8 +524,11 @@ void latencyCommand(redisClient *c) { ...@@ -524,8 +524,11 @@ void latencyCommand(redisClient *c) {
if (!strcasecmp(c->argv[1]->ptr,"history") && c->argc == 3) { if (!strcasecmp(c->argv[1]->ptr,"history") && c->argc == 3) {
/* LATENCY HISTORY <event> */ /* LATENCY HISTORY <event> */
ts = dictFetchValue(server.latency_events,c->argv[2]->ptr); ts = dictFetchValue(server.latency_events,c->argv[2]->ptr);
if (ts == NULL) goto nodataerr; if (ts == NULL) {
latencyCommandReplyWithSamples(c,ts); addReplyMultiBulkLen(c,0);
} else {
latencyCommandReplyWithSamples(c,ts);
}
} else if (!strcasecmp(c->argv[1]->ptr,"graph") && c->argc == 3) { } else if (!strcasecmp(c->argv[1]->ptr,"graph") && c->argc == 3) {
/* LATENCY GRAPH <event> */ /* LATENCY GRAPH <event> */
sds graph; sds graph;
......
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