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
b1ad58ed
Commit
b1ad58ed
authored
Mar 04, 2010
by
antirez
Browse files
redis-benchmark now implements Set commands benchmarks
parent
66ef8da0
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis-benchmark.c
View file @
b1ad58ed
...
@@ -464,7 +464,7 @@ void parseOptions(int argc, char **argv) {
...
@@ -464,7 +464,7 @@ void parseOptions(int argc, char **argv) {
printf
(
" -n <requests> Total number of requests (default 10000)
\n
"
);
printf
(
" -n <requests> Total number of requests (default 10000)
\n
"
);
printf
(
" -d <size> Data size of SET/GET value in bytes (default 2)
\n
"
);
printf
(
" -d <size> Data size of SET/GET value in bytes (default 2)
\n
"
);
printf
(
" -k <boolean> 1=keep alive 0=reconnect (default 1)
\n
"
);
printf
(
" -k <boolean> 1=keep alive 0=reconnect (default 1)
\n
"
);
printf
(
" -r <keyspacelen> Use random keys for SET/GET/INCR
\n
"
);
printf
(
" -r <keyspacelen> Use random keys for SET/GET/INCR
, random values for SADD
\n
"
);
printf
(
" Using this option the benchmark will get/set keys
\n
"
);
printf
(
" Using this option the benchmark will get/set keys
\n
"
);
printf
(
" in the form mykey_rand000000012456 instead of constant
\n
"
);
printf
(
" in the form mykey_rand000000012456 instead of constant
\n
"
);
printf
(
" keys, the <keyspacelen> argument determines the max
\n
"
);
printf
(
" keys, the <keyspacelen> argument determines the max
\n
"
);
...
@@ -595,6 +595,24 @@ int main(int argc, char **argv) {
...
@@ -595,6 +595,24 @@ int main(int argc, char **argv) {
aeMain
(
config
.
el
);
aeMain
(
config
.
el
);
endBenchmark
(
"LPOP"
);
endBenchmark
(
"LPOP"
);
prepareForBenchmark
();
c
=
createClient
();
if
(
!
c
)
exit
(
1
);
c
->
obuf
=
sdscat
(
c
->
obuf
,
"SADD myset 24
\r\n
counter_rand000000000000
\r\n
"
);
prepareClientForReply
(
c
,
REPLY_RETCODE
);
createMissingClients
(
c
);
aeMain
(
config
.
el
);
endBenchmark
(
"SADD"
);
prepareForBenchmark
();
c
=
createClient
();
if
(
!
c
)
exit
(
1
);
c
->
obuf
=
sdscat
(
c
->
obuf
,
"SPOP myset
\r\n
"
);
prepareClientForReply
(
c
,
REPLY_BULK
);
createMissingClients
(
c
);
aeMain
(
config
.
el
);
endBenchmark
(
"SPOP"
);
prepareForBenchmark
();
prepareForBenchmark
();
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