From 60a9418ed9adaff7844113b89fd4a4c01100f0b9 Mon Sep 17 00:00:00 2001 From: Matt Stancliff Date: Tue, 25 Nov 2014 12:19:58 -0500 Subject: [PATCH] redis-benchmark: Add RPUSH and RPOP tests --- src/redis-benchmark.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 19920381..7567e018 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -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__");