From cb7d22d179ea528045b997fdcdb8ce678547ca87 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 26 Nov 2014 16:35:46 +0100 Subject: [PATCH] Fix DEBUG OBJECT lru field to report seconds. Because of (not so) recent Redis changes, now the LRU internally reported unit is milliseconds, not seconds, but the DEBUG OBJECT output was still claiming seconds while providing milliseconds. However OBJECT IDLETIME was working as expected, which is the correct API to use. --- src/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index d566f716d..a22556bd2 100644 --- a/src/debug.c +++ b/src/debug.c @@ -301,7 +301,7 @@ void debugCommand(redisClient *c) { "lru:%d lru_seconds_idle:%llu", (void*)val, val->refcount, strenc, (long long) rdbSavedObjectLen(val), - val->lru, estimateObjectIdleTime(val)); + val->lru, estimateObjectIdleTime(val)/1000); } else if (!strcasecmp(c->argv[1]->ptr,"sdslen") && c->argc == 3) { dictEntry *de; robj *val;