mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
redis-benchmark: Add RPUSH and RPOP tests
This commit is contained in:
parent
0f15eb183b
commit
60a9418ed9
@ -738,12 +738,24 @@ int main(int argc, const char **argv) {
|
|||||||
free(cmd);
|
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")) {
|
if (test_is_selected("lpop")) {
|
||||||
len = redisFormatCommand(&cmd,"LPOP mylist");
|
len = redisFormatCommand(&cmd,"LPOP mylist");
|
||||||
benchmark("LPOP",cmd,len);
|
benchmark("LPOP",cmd,len);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (test_is_selected("rpop")) {
|
||||||
|
len = redisFormatCommand(&cmd,"RPOP mylist");
|
||||||
|
benchmark("RPOP",cmd,len);
|
||||||
|
free(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
if (test_is_selected("sadd")) {
|
if (test_is_selected("sadd")) {
|
||||||
len = redisFormatCommand(&cmd,
|
len = redisFormatCommand(&cmd,
|
||||||
"SADD myset element:__rand_int__");
|
"SADD myset element:__rand_int__");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user