diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-10-15 18:17:06 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-10-15 18:17:06 +0200 |
commit | ea5b70924d444c5ebf32afdd577ddc7c1328a674 (patch) | |
tree | e5a0c65d44eb0a0273e1ce8a8b40261bc8ddbb09 /src/redis-benchmark.c | |
parent | 1aa608fc68877bcf7c7f287cf7a373fd6ef8a92c (diff) | |
download | redis-ea5b70924d444c5ebf32afdd577ddc7c1328a674.tar.gz |
Add benchmark for MSET
Diffstat (limited to 'src/redis-benchmark.c')
-rw-r--r-- | src/redis-benchmark.c | 18 |
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); |