aeMain(config.el);
endBenchmark("LRANGE (first 300 elements)");
+ prepareForBenchmark();
+ c = createClient();
+ if (!c) exit(1);
+ c->obuf = sdscat(c->obuf,"LRANGE mylist 0 449\r\n");
+ prepareClientForReply(c,REPLY_MBULK);
+ createMissingClients(c);
+ aeMain(config.el);
+ endBenchmark("LRANGE (first 450 elements)");
+
+ prepareForBenchmark();
+ c = createClient();
+ if (!c) exit(1);
+ c->obuf = sdscat(c->obuf,"LRANGE mylist 0 599\r\n");
+ prepareClientForReply(c,REPLY_MBULK);
+ createMissingClients(c);
+ aeMain(config.el);
+ endBenchmark("LRANGE (first 600 elements)");
+
printf("\n");
} while(config.loop);
zfree(c);
}
+#define GLUEREPLY_UP_TO (1024)
static void glueReplyBuffersIfNeeded(redisClient *c) {
int totlen = 0;
listNode *ln;
totlen += sdslen(o->ptr);
/* This optimization makes more sense if we don't have to copy
* too much data */
- if (totlen > 1024) return;
+ if (totlen > GLUEREPLY_UP_TO) return;
}
if (totlen > 0) {
- char buf[1024];
+ char buf[GLUEREPLY_UP_TO];
int copylen = 0;
listRewind(c->reply);