mirror of
https://github.com/fluencelabs/redis
synced 2025-04-03 00:01:04 +00:00
RESP3: Use new deferred len API in object.c.
This commit is contained in:
parent
13966522ea
commit
fe67418ba4
@ -1326,7 +1326,7 @@ NULL
|
|||||||
} else if (!strcasecmp(c->argv[1]->ptr,"stats") && c->argc == 2) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"stats") && c->argc == 2) {
|
||||||
struct redisMemOverhead *mh = getMemoryOverheadData();
|
struct redisMemOverhead *mh = getMemoryOverheadData();
|
||||||
|
|
||||||
addReplyMultiBulkLen(c,(25+mh->num_dbs)*2);
|
addReplyMapLen(c,25+mh->num_dbs);
|
||||||
|
|
||||||
addReplyBulkCString(c,"peak.allocated");
|
addReplyBulkCString(c,"peak.allocated");
|
||||||
addReplyLongLong(c,mh->peak_allocated);
|
addReplyLongLong(c,mh->peak_allocated);
|
||||||
@ -1356,7 +1356,7 @@ NULL
|
|||||||
char dbname[32];
|
char dbname[32];
|
||||||
snprintf(dbname,sizeof(dbname),"db.%zd",mh->db[j].dbid);
|
snprintf(dbname,sizeof(dbname),"db.%zd",mh->db[j].dbid);
|
||||||
addReplyBulkCString(c,dbname);
|
addReplyBulkCString(c,dbname);
|
||||||
addReplyMultiBulkLen(c,4);
|
addReplyMapLen(c,2);
|
||||||
|
|
||||||
addReplyBulkCString(c,"overhead.hashtable.main");
|
addReplyBulkCString(c,"overhead.hashtable.main");
|
||||||
addReplyLongLong(c,mh->db[j].overhead_ht_main);
|
addReplyLongLong(c,mh->db[j].overhead_ht_main);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user