mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Merge branch 'unstable' of github.com:/antirez/redis into unstable
This commit is contained in:
commit
0c1bb1313c
@ -2407,8 +2407,13 @@ sds genRedisInfoString(char *section) {
|
|||||||
if (allsections || defsections || !strcasecmp(section,"memory")) {
|
if (allsections || defsections || !strcasecmp(section,"memory")) {
|
||||||
char hmem[64];
|
char hmem[64];
|
||||||
char peak_hmem[64];
|
char peak_hmem[64];
|
||||||
|
size_t zmalloc_used = zmalloc_used_memory();
|
||||||
|
|
||||||
bytesToHuman(hmem,zmalloc_used_memory());
|
if (zmalloc_used > server.stat_peak_memory) {
|
||||||
|
server.stat_peak_memory = zmalloc_used;
|
||||||
|
}
|
||||||
|
|
||||||
|
bytesToHuman(hmem,zmalloc_used);
|
||||||
bytesToHuman(peak_hmem,server.stat_peak_memory);
|
bytesToHuman(peak_hmem,server.stat_peak_memory);
|
||||||
if (sections++) info = sdscat(info,"\r\n");
|
if (sections++) info = sdscat(info,"\r\n");
|
||||||
info = sdscatprintf(info,
|
info = sdscatprintf(info,
|
||||||
@ -2421,7 +2426,7 @@ sds genRedisInfoString(char *section) {
|
|||||||
"used_memory_lua:%lld\r\n"
|
"used_memory_lua:%lld\r\n"
|
||||||
"mem_fragmentation_ratio:%.2f\r\n"
|
"mem_fragmentation_ratio:%.2f\r\n"
|
||||||
"mem_allocator:%s\r\n",
|
"mem_allocator:%s\r\n",
|
||||||
zmalloc_used_memory(),
|
zmalloc_used,
|
||||||
hmem,
|
hmem,
|
||||||
zmalloc_get_rss(),
|
zmalloc_get_rss(),
|
||||||
server.stat_peak_memory,
|
server.stat_peak_memory,
|
||||||
|
Loading…
Reference in New Issue
Block a user