mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
redis-benchmark: disable big buffer cleanup in hiredis context.
This new hiredis features allows us to reuse a previous context reader buffer even if already very big in order to maximize performances with big payloads (Usually hiredis re-creates buffers when they are too big and unused in order to save memory).
This commit is contained in:
parent
d6704c9bd0
commit
227b429364
@ -263,6 +263,8 @@ static client createClient(char *cmd, size_t len) {
|
|||||||
fprintf(stderr,"%s: %s\n",config.hostsocket,c->context->errstr);
|
fprintf(stderr,"%s: %s\n",config.hostsocket,c->context->errstr);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
/* Suppress hiredis cleanup of unused buffers for max speed. */
|
||||||
|
c->context->reader->maxbuf = 0;
|
||||||
/* Queue N requests accordingly to the pipeline size. */
|
/* Queue N requests accordingly to the pipeline size. */
|
||||||
c->obuf = sdsempty();
|
c->obuf = sdsempty();
|
||||||
for (j = 0; j < config.pipeline; j++)
|
for (j = 0; j < config.pipeline; j++)
|
||||||
|
Loading…
Reference in New Issue
Block a user