From 9c5e2bb226c797d1eb815cddc342d4ed19a05e1e 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/server.c | 2 +- src/valkey-benchmark.c | 18 +++++++++--------- src/valkey-check-aof.c | 4 ++-- src/valkey-check-rdb.c | 2 +- src/valkey-cli.c | 26 +++++++++++++------------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/server.c b/src/server.c index 2043dce04..f6db14040 100644 --- a/src/server.c +++ b/src/server.c @@ -7011,7 +7011,7 @@ int main(int argc, char **argv) { strcmp(argv[1], "--version") == 0) { sds version = getVersion(); - printf("Redis server %s\n", version); + printf("Valkey server %s\n", version); sdsfree(version); exit(0); } diff --git a/src/valkey-benchmark.c b/src/valkey-benchmark.c index 48d178109..b09975123 100644 --- a/src/valkey-benchmark.c +++ b/src/valkey-benchmark.c @@ -1403,7 +1403,7 @@ int parseOptions(int argc, char **argv) { config.numclients = atoi(argv[++i]); } else if (!strcmp(argv[i],"-v") || !strcmp(argv[i], "--version")) { sds version = cliVersion(); - printf("redis-benchmark %s\n", version); + printf("valkey-benchmark %s\n", version); sdsfree(version); exit(0); } else if (!strcmp(argv[i],"-n")) { @@ -1585,12 +1585,12 @@ usage: 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 on format redis://user:password@host:port/dbnum\n" " User, password and dbnum are optional. For authentication\n" @@ -1637,17 +1637,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-aof.c b/src/valkey-check-aof.c index 0cc9c7b3f..cf2888cb9 100644 --- a/src/valkey-check-aof.c +++ b/src/valkey-check-aof.c @@ -200,7 +200,7 @@ int processAnnotations(FILE *fp, char *filename, int last_file) { printf("Failed to truncate AOF %s to timestamp %ld to offset %ld because it is not the last file.\n", filename, to_timestamp, (long int)epos); printf("If you insist, please delete all files after this file according to the manifest " - "file and delete the corresponding records in manifest file manually. Then re-run redis-check-aof.\n"); + "file and delete the corresponding records in manifest file manually. Then re-run valkey-check-aof.\n"); exit(1); } /* Truncate remaining AOF if exceeding 'to_timestamp' */ @@ -526,7 +526,7 @@ int redis_check_aof_main(int argc, char **argv) { } else if (argc == 2) { if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) { sds version = getVersion(); - printf("redis-check-aof %s\n", version); + printf("valkey-check-aof %s\n", version); sdsfree(version); exit(0); } diff --git a/src/valkey-check-rdb.c b/src/valkey-check-rdb.c index ffc201cb2..f938a4866 100644 --- a/src/valkey-check-rdb.c +++ b/src/valkey-check-rdb.c @@ -416,7 +416,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 = getVersion(); - 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 3c0c8cd09..ba16d03fa 100644 --- a/src/valkey-cli.c +++ b/src/valkey-cli.c @@ -2904,7 +2904,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")) { @@ -3023,9 +3023,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" " -t Server connection timeout in seconds (decimals allowed).\n" @@ -3130,19 +3130,19 @@ version,tls_usage); " Use --cluster help to list all available cluster manager commands.\n" "\n" "Examples:\n" -" redis-cli -u redis://default:PASSWORD@localhost:6379/0\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");