From e4e100bb30d6013d48a3e20c931a3c27abb94470 Mon Sep 17 00:00:00 2001 From: bluayer Date: Thu, 5 Dec 2024 18:07:24 +0900 Subject: [PATCH] Formatting according to clang-format Signed-off-by: bluayer --- src/valkey-benchmark.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/valkey-benchmark.c b/src/valkey-benchmark.c index 4061c7ec77..0e64e49124 100644 --- a/src/valkey-benchmark.c +++ b/src/valkey-benchmark.c @@ -714,7 +714,6 @@ static client createClient(char *cmd, size_t len, client from, int thread_id) { if (config.cluster_mode && config.read_from_replicas) { char *buf = NULL; int len; - len = redisFormatCommand(&buf, "READONLY"); c->obuf = sdscatlen(c->obuf, buf, len); free(buf); @@ -846,7 +845,7 @@ static void showLatencyReport(void) { printf(" %d bytes payload\n", config.datasize); printf(" keep alive: %d\n", config.keepalive); if (config.cluster_mode) { - char * node_prefix = config.read_from_replicas ? "replicas" : "primaries"; + char *node_prefix = config.read_from_replicas ? "replicas" : "primaries"; printf(" cluster mode: yes (%d %s)\n", config.cluster_node_count, node_prefix); int m; for (m = 0; m < config.cluster_node_count; m++) { @@ -1204,7 +1203,6 @@ static int fetchClusterSlotsConfiguration(client c) { int from, to, slot; from = r->element[0]->integer; to = r->element[1]->integer; - size_t start, end; if (config.read_from_replicas) { start = 3; @@ -1499,7 +1497,7 @@ int parseOptions(int argc, char **argv) { " --replicas Enable read from replicas in cluster mode.\n" " This command must be used with the --cluster option.\n" " When using this option, it is recommended to use only \n" - " the commands for read requests." + " the commands for read requests.\n" " --enable-tracking Send CLIENT TRACKING on before starting benchmark.\n" " -k 1=keep alive 0=reconnect (default 1)\n" " -r Use random keys for SET/GET/INCR, random values for SADD,\n" @@ -1686,7 +1684,7 @@ int main(int argc, char **argv) { fprintf(stderr, "Invalid cluster: %d node(s).\n", config.cluster_node_count); exit(1); } - char * node_prefix = config.read_from_replicas ? "replica" : "primary"; + char *node_prefix = config.read_from_replicas ? "replica" : "primary"; printf("Cluster has %d %s nodes:\n\n", config.cluster_node_count, node_prefix); int i = 0; for (; i < config.cluster_node_count; i++) {