From d69a483556e7bcd8642723482bd1de1cc5a10ff4 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Dec 2010 18:39:52 +0100 Subject: [PATCH] Make the MSET benchmark *really* work with 10 keys --- src/redis-benchmark.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 71c12d93..382874b3 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -479,11 +479,13 @@ int main(int argc, char **argv) { benchmark("PING",cmd,len); free(cmd); - const char *argv[11]; + const char *argv[21]; argv[0] = "MSET"; - for (i = 1; i < 11; i++) - argv[i] = data; - len = redisFormatCommandArgv(&cmd,11,argv,NULL); + for (i = 1; i < 21; i += 2) { + argv[i] = "foo:rand:000000000000"; + argv[i+1] = data; + } + len = redisFormatCommandArgv(&cmd,21,argv,NULL); benchmark("MSET (10 keys)",cmd,len); free(cmd); -- 2.45.2