[Redis-benchmark] Support zset type
(cherry picked from commit e6c811cd851cc1b37a0b626458258a26cea0bab3)
This commit is contained in:
parent
57c6b0e718
commit
e7ce996d8c
@ -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") ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user