summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-10-24 12:21:34 +0200
committerantirez <antirez@gmail.com>2012-10-24 12:21:34 +0200
commit1eb91450898066bca8d90726869ab76861594cf6 (patch)
tree27772decc99d72a855e3ebbf10abcfbf71b50d59
parent5eec376c2f56dbf617cc8bc19476fd5431cd664d (diff)
downloadredis-1eb91450898066bca8d90726869ab76861594cf6.tar.gz
Update memory peak stats while loading RDB / AOF.
-rw-r--r--src/rdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rdb.c b/src/rdb.c
index fd9fcacf2..b7ce8858e 100644
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -1010,6 +1010,8 @@ void startLoading(FILE *fp) {
/* Refresh the loading progress info */
void loadingProgress(off_t pos) {
server.loading_loaded_bytes = pos;
+ if (server.stat_peak_memory < zmalloc_used_memory())
+ server.stat_peak_memory = zmalloc_used_memory();
}
/* Loading finished */