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
e039c85b
Commit
e039c85b
authored
Nov 02, 2018
by
Itamar Haber
Browse files
Adds HELP to LATENCY
Signed-off-by:
Itamar Haber
<
itamar@redislabs.com
>
parent
edce5150
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/latency.c
View file @
e039c85b
...
@@ -562,11 +562,21 @@ sds latencyCommandGenSparkeline(char *event, struct latencyTimeSeries *ts) {
...
@@ -562,11 +562,21 @@ sds latencyCommandGenSparkeline(char *event, struct latencyTimeSeries *ts) {
*
*
* LATENCY HISTORY: return time-latency samples for the specified event.
* LATENCY HISTORY: return time-latency samples for the specified event.
* LATENCY LATEST: return the latest latency for all the events classes.
* LATENCY LATEST: return the latest latency for all the events classes.
* LATENCY DOCTOR: returns a
n
human readable analysis of instance latency.
* LATENCY DOCTOR: returns a human readable analysis of instance latency.
* LATENCY GRAPH: provide an ASCII graph of the latency of the specified event.
* LATENCY GRAPH: provide an ASCII graph of the latency of the specified event.
* LATENCY RESET: reset data of a specified event or all the data if no event provided.
* LATENCY RESET: reset data of a specified event or all the data if no event provided.
*/
*/
void
latencyCommand
(
client
*
c
)
{
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
;
struct
latencyTimeSeries
*
ts
;
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"history"
)
&&
c
->
argc
==
3
)
{
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"history"
)
&&
c
->
argc
==
3
)
{
...
@@ -611,8 +621,10 @@ void latencyCommand(client *c) {
...
@@ -611,8 +621,10 @@ void latencyCommand(client *c) {
resets
+=
latencyResetEvent
(
c
->
argv
[
j
]
->
ptr
);
resets
+=
latencyResetEvent
(
c
->
argv
[
j
]
->
ptr
);
addReplyLongLong
(
c
,
resets
);
addReplyLongLong
(
c
,
resets
);
}
}
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"help"
)
&&
c
->
argc
>=
2
)
{
addReplyHelp
(
c
,
help
);
}
else
{
}
else
{
addReply
(
c
,
shared
.
syntaxerr
);
addReply
SubcommandSyntaxError
(
c
);
}
}
return
;
return
;
...
...
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