summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/object.c b/src/object.c
index dab0648a8..7a5563ccb 100644
--- a/src/object.c
+++ b/src/object.c
@@ -29,6 +29,7 @@
*/
#include "server.h"
+#include "functions.h"
#include <math.h>
#include <ctype.h>
@@ -1212,6 +1213,8 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
}
mh->lua_caches = mem;
mem_total+=mem;
+ mh->functions_caches = functionsMemoryOverhead();
+ mem_total+=mh->functions_caches;
for (j = 0; j < server.dbnum; j++) {
redisDb *db = server.db+j;
@@ -1527,7 +1530,7 @@ NULL
} else if (!strcasecmp(c->argv[1]->ptr,"stats") && c->argc == 2) {
struct redisMemOverhead *mh = getMemoryOverheadData();
- addReplyMapLen(c,25+mh->num_dbs);
+ addReplyMapLen(c,26+mh->num_dbs);
addReplyBulkCString(c,"peak.allocated");
addReplyLongLong(c,mh->peak_allocated);
@@ -1553,6 +1556,9 @@ NULL
addReplyBulkCString(c,"lua.caches");
addReplyLongLong(c,mh->lua_caches);
+ addReplyBulkCString(c,"functions.caches");
+ addReplyLongLong(c,mh->functions_caches);
+
for (size_t j = 0; j < mh->num_dbs; j++) {
char dbname[32];
snprintf(dbname,sizeof(dbname),"db.%zd",mh->db[j].dbid);