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.
This commit is contained in:
antirez
2014-07-01 11:43:38 +02:00
parent 62ca4bd438
commit 44cf7395a2
3 changed files with 78 additions and 67 deletions

View File

@ -166,6 +166,7 @@ typedef long long mstime_t; /* millisecond time type. */
#define REDIS_CMD_STALE 1024 /* "t" flag */
#define REDIS_CMD_SKIP_MONITOR 2048 /* "M" flag */
#define REDIS_CMD_ASKING 4096 /* "k" flag */
#define REDIS_CMD_FAST 8192 /* "F" flag */
/* Object types */
#define REDIS_STRING 0