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" (#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 and zuiderkwast committed Apr 9, 2024
1 parent 184f32a commit 48f7a21
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
18 changes: 9 additions & 9 deletions src/valkey-benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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 <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.\n"
" -c <clients> Number of parallel connections (default 50).\n"
Expand Down Expand Up @@ -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"
);
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 @@ -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);
}
Expand Down
25 changes: 13 additions & 12 deletions src/valkey-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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 <hostname> Server hostname (default: 127.0.0.1).\n"
" -p <port> Server port (default: 6379).\n"
" -s <socket> Server socket (overrides hostname and port).\n"
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 48f7a21

Please sign in to comment.