]> git.saurik.com Git - redis.git/commitdiff
Lua memory usage in INFO
authorantirez <antirez@gmail.com>
Sat, 7 May 2011 09:40:29 +0000 (11:40 +0200)
committerantirez <antirez@gmail.com>
Wed, 25 May 2011 10:32:48 +0000 (12:32 +0200)
src/redis.c

index 7c97e6dc16cfb973655b8e49940adf05a47b279e..39c4ba925eb13059e66acdaaf311aa7d888e769f 100644 (file)
@@ -1320,6 +1320,7 @@ sds genRedisInfoString(char *section) {
             "used_memory_rss:%zu\r\n"
             "used_memory_peak:%zu\r\n"
             "used_memory_peak_human:%s\r\n"
+            "used_memory_lua:%lld\r\n"
             "mem_fragmentation_ratio:%.2f\r\n"
             "mem_allocator:%s\r\n",
             zmalloc_used_memory(),
@@ -1327,6 +1328,7 @@ sds genRedisInfoString(char *section) {
             zmalloc_get_rss(),
             server.stat_peak_memory,
             peak_hmem,
+            ((long long)lua_gc(server.lua,LUA_GCCOUNT,0))*1024LL,
             zmalloc_get_fragmentation_ratio(),
             REDIS_MALLOC
             );