From 8c3402dffaa52f54da5f560ca6dde036052828b1 Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 7 May 2011 11:40:29 +0200 Subject: [PATCH] Lua memory usage in INFO --- src/redis.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/redis.c b/src/redis.c index 7c97e6dc..39c4ba92 100644 --- a/src/redis.c +++ b/src/redis.c @@ -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 ); -- 2.45.2