summaryrefslogtreecommitdiff
path: root/src/redis-benchmark.c
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-10-15 18:17:06 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-10-15 18:17:06 +0200
commitea5b70924d444c5ebf32afdd577ddc7c1328a674 (patch)
treee5a0c65d44eb0a0273e1ce8a8b40261bc8ddbb09 /src/redis-benchmark.c
parent1aa608fc68877bcf7c7f287cf7a373fd6ef8a92c (diff)
downloadredis-ea5b70924d444c5ebf32afdd577ddc7c1328a674.tar.gz
Add benchmark for MSET
Diffstat (limited to 'src/redis-benchmark.c')
-rw-r--r--src/redis-benchmark.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
index ce2301806..c5ababf2a 100644
--- a/src/redis-benchmark.c
+++ b/src/redis-benchmark.c
@@ -575,6 +575,24 @@ int main(int argc, char **argv) {
aeMain(config.el);
endBenchmark();
+ prepareForBenchmark("MSET (10 keys, multi bulk)");
+ c = createClient();
+ if (!c) exit(1);
+ c->obuf = sdscatprintf(c->obuf,"*%d\r\n$4\r\nMSET\r\n", 11);
+ {
+ int i;
+ char *data = zmalloc(config.datasize+2);
+ memset(data,'x',config.datasize);
+ for (i = 0; i < 10; i++) {
+ c->obuf = sdscatprintf(c->obuf,"$%d\r\n%s\r\n",config.datasize,data);
+ }
+ zfree(data);
+ }
+ prepareClientForReply(c,REPLY_RETCODE);
+ createMissingClients(c);
+ aeMain(config.el);
+ endBenchmark();
+
prepareForBenchmark("SET");
c = createClient();
if (!c) exit(1);