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
f474a5bd
Commit
f474a5bd
authored
Dec 18, 2010
by
Didier Spezia
Committed by
Pieter Noordhuis
Dec 18, 2010
Browse files
Add wait states to deal with many connections.
parent
1cd3c1e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
f474a5bd
...
...
@@ -278,11 +278,22 @@ static client createClient(int replytype) {
}
static
void
createMissingClients
(
client
c
)
{
int
n
=
0
;
while
(
config
.
liveclients
<
config
.
numclients
)
{
client
new
=
createClient
(
c
->
replytype
);
new
->
obuf
=
sdsdup
(
c
->
obuf
);
if
(
config
.
randomkeys
)
randomizeClientKey
(
c
);
/* Listen backlog is quite limited on most systems */
if
(
++
n
>
64
)
{
usleep
(
50000
);
n
=
0
;
}
}
/* Start the timer once the connection are established */
config
.
start
=
mstime
();
}
static
int
compareLatency
(
const
void
*
a
,
const
void
*
b
)
{
...
...
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