Skip to content

Commit

Permalink
Changes references to redis binaries in output of "--help", "--versio…
Browse files Browse the repository at this point in the history
…n" (valkey-io#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 <[email protected]>
  • Loading branch information
lipzhu authored Apr 4, 2024
1 parent e3e1f9a commit 9c5e2bb
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
18 changes: 9 additions & 9 deletions src/valkey-benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -1585,12 +1585,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 <hostname> Server hostname (default 127.0.0.1)\n"
" -p <port> Server port (default 6379)\n"
" -s <socket> Server socket (overrides host and port)\n"
" -a <password> Password for Redis Auth\n"
" -a <password> Password for Valkey Auth\n"
" --user <username> Used to send ACL style 'AUTH username pass'. Needs -a.\n"
" -u <uri> Server URI on format redis://user:password@host:port/dbnum\n"
" User, password and dbnum are optional. For authentication\n"
Expand Down Expand Up @@ -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"
);
Expand Down
4 changes: 2 additions & 2 deletions src/valkey-check-aof.c
Original file line number Diff line number Diff line change
Expand Up @@ -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' */
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/valkey-check-rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
26 changes: 13 additions & 13 deletions src/valkey-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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 <hostname> Server hostname (default: 127.0.0.1).\n"
" -p <port> Server port (default: 6379).\n"
" -t <timeout> Server connection timeout in seconds (decimals allowed).\n"
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 9c5e2bb

Please sign in to comment.