LATENCY DOCTOR first implementation complete.

This commit is contained in:
antirez
2014-07-08 17:05:56 +02:00
parent 57e931debc
commit 7fb90a670e
5 changed files with 185 additions and 6 deletions

View File

@ -745,6 +745,7 @@ int rdbSaveBackground(char *filename) {
} else {
/* Parent */
server.stat_fork_time = ustime()-start;
server.stat_fork_rate = (double) zmalloc_used_memory() * 1000000 / server.stat_fork_time / (1024*1024*1024); /* GB per second. */
latencyAddSampleIfNeeded("fork",server.stat_fork_time/1000);
if (childpid == -1) {
server.lastbgsave_status = REDIS_ERR;