From 688d32e16b5cb8b8fe6b9da0bb4266db5f9f60fb Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 7 Feb 2014 18:29:20 +0100 Subject: [PATCH] Don't count time to feed MONITORs in SLOWLOG. --- src/redis.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/redis.c b/src/redis.c index bed26fd2..b8cb7dec 100644 --- a/src/redis.c +++ b/src/redis.c @@ -1792,7 +1792,7 @@ void forceCommandPropagation(redisClient *c, int flags) { /* Call() is the core of Redis execution of a command */ void call(redisClient *c, int flags) { - long long dirty, start = ustime(), duration; + long long dirty, start, duration; int client_old_flags = c->flags; /* Sent the command to clients in MONITOR mode, only if the commands are @@ -1808,9 +1808,10 @@ void call(redisClient *c, int flags) { c->flags &= ~(REDIS_FORCE_AOF|REDIS_FORCE_REPL); redisOpArrayInit(&server.also_propagate); dirty = server.dirty; + start = ustime(); c->cmd->proc(c); - dirty = server.dirty-dirty; duration = ustime()-start; + dirty = server.dirty-dirty; /* When EVAL is called loading the AOF we don't want commands called * from Lua to go into the slowlog or to populate statistics. */ -- GitLab