summaryrefslogtreecommitdiff
path: root/src/latency.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/latency.c')
-rw-r--r--src/latency.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/latency.c b/src/latency.c
index 535e48c2b..d447b2b5b 100644
--- a/src/latency.c
+++ b/src/latency.c
@@ -584,16 +584,6 @@ sds latencyCommandGenSparkeline(char *event, struct latencyTimeSeries *ts) {
* LATENCY RESET: reset data of a specified event or all the data if no event provided.
*/
void latencyCommand(client *c) {
- const char *help[] = {
-"DOCTOR -- Returns a human readable latency analysis report.",
-"GRAPH <event> -- Returns an ASCII latency graph for the event class.",
-"HISTORY <event> -- Returns time-latency samples for the event class.",
-"LATEST -- Returns the latest latency samples for all events.",
-"RESET [event ...] -- Resets latency data of one or more event classes.",
-" (default: reset all data for all event classes)",
-"HELP -- Prints this help.",
-NULL
- };
struct latencyTimeSeries *ts;
if (!strcasecmp(c->argv[1]->ptr,"history") && c->argc == 3) {
@@ -639,6 +629,20 @@ NULL
addReplyLongLong(c,resets);
}
} else if (!strcasecmp(c->argv[1]->ptr,"help") && c->argc == 2) {
+ const char *help[] = {
+"DOCTOR",
+" Return a human readable latency analysis report.",
+"GRAPH <event>",
+" Return an ASCII latency graph for the <event> class.",
+"HISTORY <event>",
+" Return time-latency samples for the <event> class.",
+"LATEST",
+" Return the latest latency samples for all events.",
+"RESET [<event> ...]",
+" Reset latency data of one or more <event> classes.",
+" (default: reset all data for all event classes)",
+NULL
+ };
addReplyHelp(c, help);
} else {
addReplySubcommandSyntaxError(c);