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
e5a50ed3
Commit
e5a50ed3
authored
Aug 06, 2020
by
ShooterIT
Browse files
[Redis-benchmark] Support zset type
parent
3244fae7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
e5a50ed3
...
@@ -1733,6 +1733,22 @@ int main(int argc, const char **argv) {
...
@@ -1733,6 +1733,22 @@ int main(int argc, const char **argv) {
free(cmd);
free(cmd);
}
}
if (test_is_selected("zadd")) {
char *score = "0";
if (config.randomkeys) score = "__rand_int__";
len = redisFormatCommand(&cmd,
"ZADD myzset:{tag} %s element:__rand_int__",score);
benchmark("ZADD",cmd,len);
free(cmd);
}
if (test_is_selected("zrem")) {
len = redisFormatCommand(&cmd,
"ZREM myzset:{tag} element:__rand_int__");
benchmark("ZREM",cmd,len);
free(cmd);
}
if (test_is_selected("lrange") ||
if (test_is_selected("lrange") ||
test_is_selected("lrange_100") ||
test_is_selected("lrange_100") ||
test_is_selected("lrange_300") ||
test_is_selected("lrange_300") ||
...
...
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