Permalink
Browse files

fix 'age' stat for stats items

credit goes to anton.yuzhaninov for the report and patch
  • Loading branch information...
1 parent a16ce58 commit 595572c1003ae53d89d8ca4f7ccde51ea2196574 @dormando dormando committed Jan 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 items.c
View
@@ -419,7 +419,7 @@ void do_item_stats(ADD_STAT add_stats, void *c) {
continue;
}
APPEND_NUM_FMT_STAT(fmt, i, "number", "%u", sizes[i]);
- APPEND_NUM_FMT_STAT(fmt, i, "age", "%u", tails[i]->time);
+ APPEND_NUM_FMT_STAT(fmt, i, "age", "%u", current_time - tails[i]->time);
APPEND_NUM_FMT_STAT(fmt, i, "evicted",
"%llu", (unsigned long long)itemstats[i].evicted);
APPEND_NUM_FMT_STAT(fmt, i, "evicted_nonzero",

0 comments on commit 595572c

Please sign in to comment.