mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Latency monitor: command duration is in useconds. Convert.
This commit is contained in:
parent
551bee86b4
commit
753b707d2a
@ -36,7 +36,7 @@ void latencyAddSample(char *event, mstime_t latency);
|
||||
/* Add the sample only if the elapsed time is >= to the configured threshold. */
|
||||
#define latencyAddSampleIfNeeded(event,var) \
|
||||
if (server.latency_monitor_threshold && \
|
||||
var >= server.latency_monitor_threshold) \
|
||||
latencyAddSample(event,var);
|
||||
(var) >= server.latency_monitor_threshold) \
|
||||
latencyAddSample((event),(var));
|
||||
|
||||
#endif /* __LATENCY_H */
|
||||
|
@ -2026,7 +2026,7 @@ void call(redisClient *c, int flags) {
|
||||
if (flags & REDIS_CALL_SLOWLOG && c->cmd->proc != execCommand) {
|
||||
char *latency_event = (c->cmd->flags & REDIS_CMD_FAST) ?
|
||||
"fast-command" : "command";
|
||||
latencyAddSampleIfNeeded(latency_event,duration);
|
||||
latencyAddSampleIfNeeded(latency_event,duration/1000);
|
||||
slowlogPushEntryIfNeeded(c->argv,c->argc,duration);
|
||||
}
|
||||
if (flags & REDIS_CALL_STATS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user