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
2cf51b46
Commit
2cf51b46
authored
Nov 25, 2014
by
Matt Stancliff
Browse files
redis-benchmark: Add RPUSH and RPOP tests
parent
36f7ca08
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
2cf51b46
...
...
@@ -738,12 +738,24 @@ int main(int argc, const char **argv) {
free
(
cmd
);
}
if
(
test_is_selected
(
"rpush"
))
{
len
=
redisFormatCommand
(
&
cmd
,
"RPUSH mylist %s"
,
data
);
benchmark
(
"RPUSH"
,
cmd
,
len
);
free
(
cmd
);
}
if
(
test_is_selected
(
"lpop"
))
{
len
=
redisFormatCommand
(
&
cmd
,
"LPOP mylist"
);
benchmark
(
"LPOP"
,
cmd
,
len
);
free
(
cmd
);
}
if
(
test_is_selected
(
"rpop"
))
{
len
=
redisFormatCommand
(
&
cmd
,
"RPOP mylist"
);
benchmark
(
"RPOP"
,
cmd
,
len
);
free
(
cmd
);
}
if
(
test_is_selected
(
"sadd"
))
{
len
=
redisFormatCommand
(
&
cmd
,
"SADD myset element:__rand_int__"
);
...
...
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