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
1766d916
Commit
1766d916
authored
Jul 02, 2014
by
antirez
Browse files
LATENCY LATEST: add the max field.
parent
e173f7a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/latency.c
View file @
1766d916
...
@@ -131,10 +131,11 @@ void latencyCommandReplyWithLatestEvents(redisClient *c) {
...
@@ -131,10 +131,11 @@ void latencyCommandReplyWithLatestEvents(redisClient *c) {
struct
latencyTimeSeries
*
ts
=
dictGetVal
(
de
);
struct
latencyTimeSeries
*
ts
=
dictGetVal
(
de
);
int
last
=
(
ts
->
idx
+
LATENCY_TS_LEN
-
1
)
%
LATENCY_TS_LEN
;
int
last
=
(
ts
->
idx
+
LATENCY_TS_LEN
-
1
)
%
LATENCY_TS_LEN
;
addReplyMultiBulkLen
(
c
,
3
);
addReplyMultiBulkLen
(
c
,
4
);
addReplyBulkCString
(
c
,
event
);
addReplyBulkCString
(
c
,
event
);
addReplyLongLong
(
c
,
ts
->
samples
[
last
].
time
);
addReplyLongLong
(
c
,
ts
->
samples
[
last
].
time
);
addReplyLongLong
(
c
,
ts
->
samples
[
last
].
latency
);
addReplyLongLong
(
c
,
ts
->
samples
[
last
].
latency
);
addReplyLongLong
(
c
,
ts
->
max
);
}
}
dictReleaseIterator
(
di
);
dictReleaseIterator
(
di
);
}
}
...
...
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