Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ea3a20c5
Commit
ea3a20c5
authored
Jul 19, 2018
by
antirez
Browse files
Change INFO CLIENTS sections to report pre-computed max/min client buffers.
parent
8f7e496b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
ea3a20c5
...
@@ -3081,17 +3081,17 @@ sds genRedisInfoString(char *section) {
...
@@ -3081,17 +3081,17 @@ sds genRedisInfoString(char *section) {
/* Clients */
/* Clients */
if
(
allsections
||
defsections
||
!
strcasecmp
(
section
,
"clients"
))
{
if
(
allsections
||
defsections
||
!
strcasecmp
(
section
,
"clients"
))
{
unsigned
long
lol
,
bib
;
size_t
maxin
,
maxout
;
get
ClientsMaxBuffers
(
&
lol
,
&
bib
);
get
ExpansiveClientsInfo
(
&
maxin
,
&
maxout
);
if
(
sections
++
)
info
=
sdscat
(
info
,
"
\r\n
"
);
if
(
sections
++
)
info
=
sdscat
(
info
,
"
\r\n
"
);
info
=
sdscatprintf
(
info
,
info
=
sdscatprintf
(
info
,
"# Clients
\r\n
"
"# Clients
\r\n
"
"connected_clients:%lu
\r\n
"
"connected_clients:%lu
\r\n
"
"client_
longest_output_list
:%
l
u
\r\n
"
"client_
max_input_buffer
:%
z
u
\r\n
"
"client_
biggest_in
put_buf:%
l
u
\r\n
"
"client_
max_out
put_buf
fer
:%
z
u
\r\n
"
"blocked_clients:%d
\r\n
"
,
"blocked_clients:%d
\r\n
"
,
listLength
(
server
.
clients
)
-
listLength
(
server
.
slaves
),
listLength
(
server
.
clients
)
-
listLength
(
server
.
slaves
),
lol
,
bib
,
maxin
,
maxout
,
server
.
blocked_clients
);
server
.
blocked_clients
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment