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
ea5b7092
Commit
ea5b7092
authored
Oct 15, 2010
by
Pieter Noordhuis
Browse files
Add benchmark for MSET
parent
1aa608fc
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
ea5b7092
...
@@ -575,6 +575,24 @@ int main(int argc, char **argv) {
...
@@ -575,6 +575,24 @@ int main(int argc, char **argv) {
aeMain
(
config
.
el
);
aeMain
(
config
.
el
);
endBenchmark
();
endBenchmark
();
prepareForBenchmark
(
"MSET (10 keys, multi bulk)"
);
c
=
createClient
();
if
(
!
c
)
exit
(
1
);
c
->
obuf
=
sdscatprintf
(
c
->
obuf
,
"*%d
\r\n
$4
\r\n
MSET
\r\n
"
,
11
);
{
int
i
;
char
*
data
=
zmalloc
(
config
.
datasize
+
2
);
memset
(
data
,
'x'
,
config
.
datasize
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
c
->
obuf
=
sdscatprintf
(
c
->
obuf
,
"$%d
\r\n
%s
\r\n
"
,
config
.
datasize
,
data
);
}
zfree
(
data
);
}
prepareClientForReply
(
c
,
REPLY_RETCODE
);
createMissingClients
(
c
);
aeMain
(
config
.
el
);
endBenchmark
();
prepareForBenchmark
(
"SET"
);
prepareForBenchmark
(
"SET"
);
c
=
createClient
();
c
=
createClient
();
if
(
!
c
)
exit
(
1
);
if
(
!
c
)
exit
(
1
);
...
...
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