Permalink
Browse files

Reset op_sec_last_sample_ops when reset requested

This value needs to be set to zero (in addition to
stat_numcommands) or else people may see
a negative operations per second count after they
run CONFIG RESETSTAT.

Fixes antirez/redis#1577
  • Loading branch information...
1 parent 385c25f commit e8bae92e5479bc64a82d92c73e9360438cf9f6f5 @mattsta mattsta committed with Mar 4, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/config.c
View
@@ -1810,6 +1810,7 @@ void configCommand(redisClient *c) {
server.stat_keyspace_hits = 0;
server.stat_keyspace_misses = 0;
server.stat_numcommands = 0;
+ server.ops_sec_last_sample_ops = 0;
server.stat_numconnections = 0;
server.stat_expiredkeys = 0;
server.stat_rejected_conn = 0;

0 comments on commit e8bae92

Please sign in to comment.