From 8612e6de888fe30bd8cfcd0f4ad1979a92434a2f Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 1 Jul 2014 11:43:38 +0200 Subject: Latency monitor: collect slow commands. We introduce the distinction between slow and fast commands since those are two different sources of latency. An O(1) or O(log N) command without side effects (can't trigger deletion of large objects as a side effect of its execution) if delayed is a symptom of inherent latency of the system. A non-fast command (commands that may run large O(N) computations) if delayed may just mean that the user is executing slow operations. The advices LATENCY should provide in this two different cases are different, so we log the two classes of commands in a separated way. --- src/latency.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/latency.h') diff --git a/src/latency.h b/src/latency.h index 5f5039259..cba303912 100644 --- a/src/latency.h +++ b/src/latency.h @@ -35,7 +35,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 && \\ + if (server.latency_monitor_threshold && \ var >= server.latency_monitor_threshold) \ latencyAddSample(event,var); -- cgit v1.2.1