INFO client_recent_max_input_buffer includes argv array (#8065)
this metric already includes the argv bytes, like what clientsCronTrackClientsMemUsage does, but it's missing the array itself. p.s. For the purpose of tracking expensive clients we don't need to include the size of the client struct and the static reply buffer in it.
This commit is contained in:
parent
cf88779527
commit
bbc2c44541
@ -1615,7 +1615,8 @@ size_t ClientsPeakMemInput[CLIENTS_PEAK_MEM_USAGE_SLOTS];
|
||||
size_t ClientsPeakMemOutput[CLIENTS_PEAK_MEM_USAGE_SLOTS];
|
||||
|
||||
int clientsCronTrackExpansiveClients(client *c) {
|
||||
size_t in_usage = sdsZmallocSize(c->querybuf) + c->argv_len_sum;
|
||||
size_t in_usage = sdsZmallocSize(c->querybuf) + c->argv_len_sum +
|
||||
(c->argv ? zmalloc_size(c->argv) : 0);
|
||||
size_t out_usage = getClientOutputBufferMemoryUsage(c);
|
||||
int i = server.unixtime % CLIENTS_PEAK_MEM_USAGE_SLOTS;
|
||||
int zeroidx = (i+1) % CLIENTS_PEAK_MEM_USAGE_SLOTS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user