Commit feecb608 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Use multi-bulk protocol in SET benchmark

parent 8146e316
...@@ -467,12 +467,13 @@ int main(int argc, char **argv) { ...@@ -467,12 +467,13 @@ int main(int argc, char **argv) {
prepareForBenchmark("SET"); prepareForBenchmark("SET");
c = createClient(REDIS_REPLY_STATUS); 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); char *data = zmalloc(config.datasize+2);
memset(data,'x',config.datasize); memset(data,'x',config.datasize);
data[config.datasize] = '\r'; data[config.datasize] = '\r';
data[config.datasize+1] = '\n'; data[config.datasize+1] = '\n';
c->obuf = sdscatprintf(c->obuf,"$%d\r\n",config.datasize);
c->obuf = sdscatlen(c->obuf,data,config.datasize+2); c->obuf = sdscatlen(c->obuf,data,config.datasize+2);
} }
createMissingClients(c); createMissingClients(c);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment