]> git.saurik.com Git - redis.git/commitdiff
More redis.conf self-documentation. Now even queries that took exactly server.slow_lo...
authorantirez <antirez@gmail.com>
Thu, 30 Jun 2011 13:54:05 +0000 (15:54 +0200)
committerantirez <antirez@gmail.com>
Thu, 30 Jun 2011 13:54:05 +0000 (15:54 +0200)
redis.conf
src/slowlog.c

index 456ffa859d9ffd71d77093a12fe5bfdc6de47e3a..1551a13a9768176099dc025064f60d38270255d3 100644 (file)
@@ -327,7 +327,13 @@ auto-aof-rewrite-min-size 64mb
 # slow log. When a new command is logged the oldest one is removed from the
 # queue of logged commands.
 
+# The following time is expressed in microseconds, so 1000000 is equivalent
+# to one second. Note that a negative number disables the slow log, while
+# a value of zero forces the logging of every command.
 slowlog-log-slower-than 10000
+
+# There is no limit to this length. Just be aware that it will consume memory.
+# You can reclaim memory used by the slow log with SLOWLOG RESET.
 slowlog-log-len 1024
 
 ############################### ADVANCED CONFIG ###############################
index a257a17bf7c2dd5d2006303b546e5901bab6f998..17edf6159f68d5a7886d1d36330106dece4acfb6 100644 (file)
@@ -55,7 +55,7 @@ void slowlogInit(void) {
  * configured max length. */
 void slowlogPushEntryIfNeeded(robj **argv, int argc, long long duration) {
     if (server.slowlog_log_slower_than < 0) return; /* Slowlog disabled */
-    if (duration > server.slowlog_log_slower_than)
+    if (duration >= server.slowlog_log_slower_than)
         listAddNodeHead(server.slowlog,slowlogCreateEntry(argv,argc,duration));
 
     /* Remove old entries if needed. */