From 48f7a21d2c91b517f69ccbec9e8ac3fd9d6bea62 Mon Sep 17 00:00:00 2001 From: Lipeng Zhu Date: Thu, 4 Apr 2024 16:46:17 +0800 Subject: [PATCH] Changes references to redis binaries in output of "--help", "--version" (#113) Rename output from redis-* to valkey-* for binaries: 1. `valkey-benchmark` 2. `valkey-cli` 3. `valkey-server` 4. `valkey-sentinel` 5. `valkey-check-rdb` 6. `valkey-check-aof` "--help" "--version" option. Signed-off-by: Lipeng Zhu --- src/valkey-benchmark.c | 18 +++++++++--------- src/valkey-check-rdb.c | 2 +- src/valkey-cli.c | 25 +++++++++++++------------ 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/valkey-benchmark.c b/src/valkey-benchmark.c index 1ee562f20c..25c75bb632 100644 --- a/src/valkey-benchmark.c +++ b/src/valkey-benchmark.c @@ -1424,7 +1424,7 @@ int parseOptions(int argc, char **argv) { config.numclients = atoi(argv[++i]); } else if (!strcmp(argv[i],"-v") || !strcmp(argv[i], "--version")) { sds version = benchmarkVersion(); - printf("redis-benchmark %s\n", version); + printf("valkey-benchmark %s\n", version); sdsfree(version); exit(0); } else if (!strcmp(argv[i],"-n")) { @@ -1606,12 +1606,12 @@ int parseOptions(int argc, char **argv) { printf( "%s%s%s", /* Split to avoid strings longer than 4095 (-Woverlength-strings). */ -"Usage: redis-benchmark [OPTIONS] [COMMAND ARGS...]\n\n" +"Usage: valkey-benchmark [OPTIONS] [COMMAND ARGS...]\n\n" "Options:\n" " -h Server hostname (default 127.0.0.1)\n" " -p Server port (default 6379)\n" " -s Server socket (overrides host and port)\n" -" -a Password for Redis Auth\n" +" -a Password for Valkey Auth\n" " --user Used to send ACL style 'AUTH username pass'. Needs -a.\n" " -u Server URI.\n" " -c Number of parallel connections (default 50).\n" @@ -1655,17 +1655,17 @@ tls_usage, " --version Output version and exit.\n\n" "Examples:\n\n" " Run the benchmark with the default configuration against 127.0.0.1:6379:\n" -" $ redis-benchmark\n\n" +" $ valkey-benchmark\n\n" " Use 20 parallel clients, for a total of 100k requests, against 192.168.1.1:\n" -" $ redis-benchmark -h 192.168.1.1 -p 6379 -n 100000 -c 20\n\n" +" $ valkey-benchmark -h 192.168.1.1 -p 6379 -n 100000 -c 20\n\n" " Fill 127.0.0.1:6379 with about 1 million keys only using the SET test:\n" -" $ redis-benchmark -t set -n 1000000 -r 100000000\n\n" +" $ valkey-benchmark -t set -n 1000000 -r 100000000\n\n" " Benchmark 127.0.0.1:6379 for a few commands producing CSV output:\n" -" $ redis-benchmark -t ping,set,get -n 100000 --csv\n\n" +" $ valkey-benchmark -t ping,set,get -n 100000 --csv\n\n" " Benchmark a specific command line:\n" -" $ redis-benchmark -r 10000 -n 10000 eval 'return redis.call(\"ping\")' 0\n\n" +" $ valkey-benchmark -r 10000 -n 10000 eval 'return redis.call(\"ping\")' 0\n\n" " Fill a list with 10000 random elements:\n" -" $ redis-benchmark -r 10000 -n 10000 lpush mylist __rand_int__\n\n" +" $ valkey-benchmark -r 10000 -n 10000 lpush mylist __rand_int__\n\n" " On user specified command lines __rand_int__ is replaced with a random integer\n" " with a range of values selected by the -r option.\n" ); diff --git a/src/valkey-check-rdb.c b/src/valkey-check-rdb.c index 682135e55f..b7eea0a6ae 100644 --- a/src/valkey-check-rdb.c +++ b/src/valkey-check-rdb.c @@ -419,7 +419,7 @@ int redis_check_rdb_main(int argc, char **argv, FILE *fp) { exit(1); } else if (!strcmp(argv[1],"-v") || !strcmp(argv[1], "--version")) { sds version = checkRdbVersion(); - printf("redis-check-rdb %s\n", version); + printf("valkey-check-rdb %s\n", version); sdsfree(version); exit(0); } diff --git a/src/valkey-cli.c b/src/valkey-cli.c index 38547014e4..077ac6391e 100644 --- a/src/valkey-cli.c +++ b/src/valkey-cli.c @@ -2899,7 +2899,7 @@ static int parseOptions(int argc, char **argv) { #endif } else if (!strcmp(argv[i],"-v") || !strcmp(argv[i], "--version")) { sds version = cliVersion(); - printf("redis-cli %s\n", version); + printf("valkey-cli %s\n", version); sdsfree(version); exit(0); } else if (!strcmp(argv[i],"-2")) { @@ -3013,9 +3013,9 @@ static void usage(int err) { ""; fprintf(target, -"redis-cli %s\n" +"valkey-cli %s\n" "\n" -"Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]\n" +"Usage: valkey-cli [OPTIONS] [cmd [arg [arg ...]]]\n" " -h Server hostname (default: 127.0.0.1).\n" " -p Server port (default: 6379).\n" " -s Server socket (overrides hostname and port).\n" @@ -3113,18 +3113,19 @@ version,tls_usage); " Use --cluster help to list all available cluster manager commands.\n" "\n" "Examples:\n" -" cat /etc/passwd | redis-cli -x set mypasswd\n" -" redis-cli -D \"\" --raw dump key > key.dump && redis-cli -X dump_tag restore key2 0 dump_tag replace < key.dump\n" -" redis-cli -r 100 lpush mylist x\n" -" redis-cli -r 100 -i 1 info | grep used_memory_human:\n" -" redis-cli --quoted-input set '\"null-\\x00-separated\"' value\n" -" redis-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3\n" -" redis-cli --scan --pattern '*:12345*'\n" -" redis-cli --scan --pattern '*:12345*' --count 100\n" +" valkey-cli -u redis://default:PASSWORD@localhost:6379/0\n" +" cat /etc/passwd | valkey-cli -x set mypasswd\n" +" valkey-cli -D \"\" --raw dump key > key.dump && valkey-cli -X dump_tag restore key2 0 dump_tag replace < key.dump\n" +" valkey-cli -r 100 lpush mylist x\n" +" valkey-cli -r 100 -i 1 info | grep used_memory_human:\n" +" valkey-cli --quoted-input set '\"null-\\x00-separated\"' value\n" +" valkey-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3\n" +" valkey-cli --scan --pattern '*:12345*'\n" +" valkey-cli --scan --pattern '*:12345*' --count 100\n" "\n" " (Note: when using --eval the comma separates KEYS[] from ARGV[] items)\n" "\n" -"When no command is given, redis-cli starts in interactive mode.\n" +"When no command is given, valkey-cli starts in interactive mode.\n" "Type \"help\" in interactive mode for information on available commands\n" "and settings.\n" "\n");