Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

reset ops per sec samples and timer as well #535

Closed
wants to merge 1 commit into from

2 participants

@anydot

Both ops per sec samples and timer were not reset by "CONFIG RESETSTAT"
which means:
1) sometimes user can see negative value for instanteneous ops per
sec stat
2) that same value can show measurements from before RESETSTAT

This commit fixes both issues

@anydot anydot reset ops per sec samples and timer as well
Both ops per sec samples and timer were not reset by "CONFIG RESETSTAT"
which means:
    1) sometimes user can see negative value for instanteneous ops per
    sec stat
    2) that same value can show measurements from before RESETSTAT

This commit fixes both issues
8e0af7c
@mattsta

Fixed in commits e150ec7 and e8bae92

@mattsta mattsta closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 4, 2012
  1. @anydot

    reset ops per sec samples and timer as well

    anydot authored
    Both ops per sec samples and timer were not reset by "CONFIG RESETSTAT"
    which means:
        1) sometimes user can see negative value for instanteneous ops per
        sec stat
        2) that same value can show measurements from before RESETSTAT
    
    This commit fixes both issues
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/config.c
View
3  src/config.c
@@ -887,6 +887,9 @@ void configCommand(redisClient *c) {
server.stat_rejected_conn = 0;
server.stat_fork_time = 0;
server.aof_delayed_fsync = 0;
+ server.ops_sec_last_sample_time = mstime();
+ server.ops_sec_last_sample_ops = 0;
+ memset(server.ops_sec_samples, 0, sizeof server.ops_sec_samples);
resetCommandTableStats();
addReply(c,shared.ok);
} else {
Something went wrong with that request. Please try again.