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

Add benchmark for MSET

parent 1aa608fc
...@@ -575,6 +575,24 @@ int main(int argc, char **argv) { ...@@ -575,6 +575,24 @@ int main(int argc, char **argv) {
aeMain(config.el); aeMain(config.el);
endBenchmark(); 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"); prepareForBenchmark("SET");
c = createClient(); c = createClient();
if (!c) exit(1); if (!c) exit(1);
......
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