diff options
author | antirez <antirez@gmail.com> | 2018-07-19 13:59:13 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-07-19 13:59:13 +0200 |
commit | 8f7e496ba50279fbc384cc391ebb45f7b4aaa8e8 (patch) | |
tree | bc38787609eaced5638ebe7150e399fb261822c8 | |
parent | 8d617596f1ba5eab71820b0e8faafad893a40176 (diff) | |
download | redis-8f7e496ba50279fbc384cc391ebb45f7b4aaa8e8.tar.gz |
Rename var in clientsCronTrackExpansiveClients() for clarity.
-rw-r--r-- | src/server.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server.c b/src/server.c index 15417a757..3ece41b7e 100644 --- a/src/server.c +++ b/src/server.c @@ -905,13 +905,13 @@ int clientsCronTrackExpansiveClients(client *c) { size_t in_usage = sdsAllocSize(c->querybuf); size_t out_usage = getClientOutputBufferMemoryUsage(c); int i = server.unixtime % CLIENTS_PEAK_MEM_USAGE_SLOTS; - int j = (i+1) % CLIENTS_PEAK_MEM_USAGE_SLOTS; + int zeroidx = (i+1) % CLIENTS_PEAK_MEM_USAGE_SLOTS; /* Always zero the next sample, so that when we switch to that second, we'll * only register samples that are greater in that second without considering * the history of such slot. */ - ClientsPeakMemInput[j] = 0; - ClientsPeakMemOutput[j] = 0; + ClientsPeakMemInput[zeroidx] = 0; + ClientsPeakMemOutput[zeroidx] = 0; /* Track the biggest values observed so far in this slot. */ if (in_usage > ClientsPeakMemInput[i]) ClientsPeakMemInput[i] = in_usage; |