diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-05 10:22:52 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-05 10:22:52 +0100 |
commit | feecb608ed0ec8f9932960d5fa8f02e551ffbe59 (patch) | |
tree | c5b0e2cd9adb1e97f695ed12b1b1db220cd7c7bd /src/redis-benchmark.c | |
parent | 8146e31677f29440854edd310adfc521a6e65bad (diff) | |
download | redis-feecb608ed0ec8f9932960d5fa8f02e551ffbe59.tar.gz |
Use multi-bulk protocol in SET benchmark
Diffstat (limited to 'src/redis-benchmark.c')
-rw-r--r-- | src/redis-benchmark.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 3051e2aec..c44b0ae45 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -467,12 +467,13 @@ int main(int argc, char **argv) { prepareForBenchmark("SET"); c = createClient(REDIS_REPLY_STATUS); - c->obuf = sdscat(c->obuf,"SET foo_rand000000000000 "); + c->obuf = sdscat(c->obuf,"*3\r\n$3\r\nSET\r\n$20\r\nfoo_rand000000000000\r\n"); { char *data = zmalloc(config.datasize+2); memset(data,'x',config.datasize); data[config.datasize] = '\r'; data[config.datasize+1] = '\n'; + c->obuf = sdscatprintf(c->obuf,"$%d\r\n",config.datasize); c->obuf = sdscatlen(c->obuf,data,config.datasize+2); } createMissingClients(c); |