You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instantaneous_ops_per_sec sometimes negative after CONFIG RESETSTAT
tested on v2.8.6
To recreate, in one terminal window run this python code
import redis
r = redis.Redis()
import time
while True:
r.ping()
time.sleep(0.1)
and in another terminal window run: redis-cli config resetstat; redis-cli info stats
You might need to repeat the commands above a few times to see it, but eventually you'll get some output like:
Notice the negative ops_per_sec above.
This is most likely because we reset server.stat_numcommands and forget to reset server.ops_sec_last_sample_ops leading to negative values in the ops per sec calculation.
The text was updated successfully, but these errors were encountered:
mattsta
added a commit
to mattsta/redis
that referenced
this issue
Mar 6, 2014
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.
Fixesredis#1577
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#1577
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#1577
instantaneous_ops_per_sec
sometimes negative afterCONFIG RESETSTAT
tested on v2.8.6
To recreate, in one terminal window run this python code
and in another terminal window run:
redis-cli config resetstat; redis-cli info stats
You might need to repeat the commands above a few times to see it, but eventually you'll get some output like:
Notice the negative ops_per_sec above.
This is most likely because we reset
server.stat_numcommands
and forget to resetserver.ops_sec_last_sample_ops
leading to negative values in the ops per sec calculation.The text was updated successfully, but these errors were encountered: