printf("WARNING: keepalive disabled, you probably need 'echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse' for Linux and 'sudo sysctl -w net.inet.tcp.msl=1000' for Mac OS X in order to use a lot of clients/requests\n");
...
...
@@ -557,10 +427,8 @@ int main(int argc, char **argv) {
if(config.idlemode){
printf("Creating %d idle connections and waiting forever (Ctrl+C when done)\n",config.numclients);
prepareForBenchmark("IDLE");
c=createClient();
if(!c)exit(1);
c=createClient(0);/* will never receive a reply */
c->obuf=sdsempty();
prepareClientForReply(c,REPLY_RETCODE);/* will never receive it */
createMissingClients(c);
aeMain(config.el);
/* and will wait for every */
...
...
@@ -568,26 +436,21 @@ int main(int argc, char **argv) {
do{
prepareForBenchmark("PING");
c=createClient();
if(!c)exit(1);
c=createClient(REDIS_REPLY_STATUS);
c->obuf=sdscat(c->obuf,"PING\r\n");
prepareClientForReply(c,REPLY_RETCODE);
createMissingClients(c);
aeMain(config.el);
endBenchmark();
prepareForBenchmark("PING (multi bulk)");
c=createClient();
if(!c)exit(1);
c=createClient(REDIS_REPLY_STATUS);
c->obuf=sdscat(c->obuf,"*1\r\n$4\r\nPING\r\n");
prepareClientForReply(c,REPLY_RETCODE);
createMissingClients(c);
aeMain(config.el);
endBenchmark();
prepareForBenchmark("MSET (10 keys, multi bulk)");