summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-06-19 09:41:11 +0200
committerantirez <antirez@gmail.com>2017-06-22 11:01:27 +0200
commit2ae733d924e3c30cd7548136dca2c752cd2e4617 (patch)
treebfca85202088ec76a6325db8b8c2dd7337a87b09
parent63e1c9f22495564a1ab5e1cd3e0c832870a25769 (diff)
downloadredis-2ae733d924e3c30cd7548136dca2c752cd2e4617.tar.gz
redis-benchmark: add -t hset target.
-rw-r--r--src/redis-benchmark.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
index f382019a4..be15b2417 100644
--- a/src/redis-benchmark.c
+++ b/src/redis-benchmark.c
@@ -779,6 +779,13 @@ int main(int argc, const char **argv) {
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")) {
len = redisFormatCommand(&cmd,"SPOP myset");
benchmark("SPOP",cmd,len);