X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/f6da155bde4c187325deee8b40fe41d45f40468d..7eb850ef0e437323e2d84157ddc2e6e82af57bbc:/src/redis-benchmark.c?ds=sidebyside diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 36f27540..1be4c07d 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -196,6 +196,8 @@ static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask) { exit(1); } + freeReplyObject(reply); + if (config.requests_finished < config.requests) config.latency[config.requests_finished++] = c->latency; c->pending--; @@ -261,6 +263,8 @@ static client createClient(char *cmd, size_t len) { fprintf(stderr,"%s: %s\n",config.hostsocket,c->context->errstr); exit(1); } + /* Suppress hiredis cleanup of unused buffers for max speed. */ + c->context->reader->maxbuf = 0; /* Queue N requests accordingly to the pipeline size. */ c->obuf = sdsempty(); for (j = 0; j < config.pipeline; j++)