Change INFO CLIENTS sections to report pre-computed max/min client buffers.

This commit is contained in:
antirez 2018-07-19 17:16:19 +02:00
parent 8f7e496ba5
commit ea3a20c5d0

View File

@ -3081,17 +3081,17 @@ sds genRedisInfoString(char *section) {
/* Clients */
if (allsections || defsections || !strcasecmp(section,"clients")) {
unsigned long lol, bib;
getClientsMaxBuffers(&lol,&bib);
size_t maxin, maxout;
getExpansiveClientsInfo(&maxin,&maxout);
if (sections++) info = sdscat(info,"\r\n");
info = sdscatprintf(info,
"# Clients\r\n"
"connected_clients:%lu\r\n"
"client_longest_output_list:%lu\r\n"
"client_biggest_input_buf:%lu\r\n"
"client_max_input_buffer:%zu\r\n"
"client_max_output_buffer:%zu\r\n"
"blocked_clients:%d\r\n",
listLength(server.clients)-listLength(server.slaves),
lol, bib,
maxin, maxout,
server.blocked_clients);
}