mirror of
https://github.com/fluencelabs/redis
synced 2025-04-13 04:36:04 +00:00
Add benchmark for MSET
This commit is contained in:
parent
1aa608fc68
commit
ea5b70924d
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user