MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / resetCommandTableStats

Function resetCommandTableStats

src/server.cpp:4250–4265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4248}
4249
4250void resetCommandTableStats(void) {
4251 struct redisCommand *c;
4252 dictEntry *de;
4253 dictIterator *di;
4254
4255 di = dictGetSafeIterator(g_pserver->commands);
4256 while((de = dictNext(di)) != NULL) {
4257 c = (struct redisCommand *) dictGetVal(de);
4258 c->microseconds = 0;
4259 c->calls = 0;
4260 c->rejected_calls = 0;
4261 c->failed_calls = 0;
4262 }
4263 dictReleaseIterator(di);
4264
4265}
4266
4267static void zfree_noconst(void *p) {
4268 zfree(p);

Callers 1

configCommandFunction · 0.85

Calls 3

dictGetSafeIteratorFunction · 0.85
dictNextFunction · 0.70
dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected