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
2a84927f
Commit
2a84927f
authored
Jun 19, 2017
by
antirez
Browse files
redis-benchmark: add -t hset target.
parent
53cb27b1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
2a84927f
...
@@ -779,6 +779,13 @@ int main(int argc, const char **argv) {
...
@@ -779,6 +779,13 @@ int main(int argc, const char **argv) {
free
(
cmd
);
free
(
cmd
);
}
}
if
(
test_is_selected
(
"hset"
))
{
len
=
redisFormatCommand
(
&
cmd
,
"HSET myset:__rand_int__ element:__rand_int__ %s"
,
data
);
benchmark
(
"HSET"
,
cmd
,
len
);
free
(
cmd
);
}
if
(
test_is_selected
(
"spop"
))
{
if
(
test_is_selected
(
"spop"
))
{
len
=
redisFormatCommand
(
&
cmd
,
"SPOP myset"
);
len
=
redisFormatCommand
(
&
cmd
,
"SPOP myset"
);
benchmark
(
"SPOP"
,
cmd
,
len
);
benchmark
(
"SPOP"
,
cmd
,
len
);
...
...
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