Repository: valkey-io/valkey
File: src/valkey-cli.c (C)

Code before:
            "                     -i to change the interval), then produces a single output\n"
            "                     and exits.\n"
            "  --latency-history  Like --latency but tracking latency changes over time.\n"
            "                     Default time interval is 15 sec. Change it using -i.\n"
            "  --latency-dist     Shows latency as a spectrum, requires xterm 256 colors.\n"
            "                     Default time interval is 1 sec. Change it using -i.\n"
            "  --lru-test <keys>  Simulate a cache workload with an 80-20 distribution.\n"
            "  --replica          Simulate a replica showing commands received from the primaries.\n"
            "  --rdb <filename>   Transfer an RDB dump from remote server to local file.\n"
            "                     Use filename of \"-\" to write to stdout.\n"
            "  --functions-rdb <filename> Like --rdb but only get the functions (not the keys)\n"
            "                     when getting the RDB dump file.\n"
            "  --pipe             Transfer raw RESP protocol from stdin to server.\n"
            "  --pipe-timeout <n> In --pipe mode, abort with error if after sending all data.\n"
            "                     no reply is received within <n> seconds.\n"
            "                     Default timeout: %d. Use 0 to wait forever.\n",
            CLI_DEFAULT_PIPE_TIMEOUT);
    fprintf(target,
            "  --bigkeys          Sample keys looking for keys with many elements (complexity).\n"
            "  --memkeys          Sample keys looking for keys consuming a lot of memory.\n"
            "  --memkeys-samples <n> Sample keys looking for keys consuming a lot of memory.\n"
            "                     And define number of key elements to sample\n"
            "  --hotkeys          Sample keys looking for hot keys.\n"
            "                     only works when maxmemory-policy is *lfu.\n"
            "  --hotkeys-count <n> Number of Sample keys looking for hot keys.\n"
            "                     only works when maxmemory-policy is *lfu.\n"
            "  --scan             List all keys using the SCAN command.\n"
            "  --pattern <pat>    Keys pattern when using the --scan, --bigkeys or --hotkeys\n"
            "                     options (default: *).\n"
            "  --count <count>    Count option when using the --scan, --bigkeys or --hotkeys (default: 10).\n"
            "  --quoted-pattern <pat> Same as --pattern, but the specified string can be\n"
            "                         quoted, in order to pass an otherwise non binary-safe string.\n"
            "  --intrinsic-latency <sec> Run a test to measure intrinsic system latency.\n"
            "                     The test will run for the specified amount of seconds.\n"
            "  --eval <file>      Send an EVAL command using the Lua script at <file>.\n"
            "  --ldb              Used with --eval enable the Server Lua debugger.\n"
            "  --ldb-sync-mode    Like --ldb but uses the synchronous Lua debugger, in\n"
            "                     this mode the server is blocked and script changes are\n"
            "                     not rolled back from the server memory.\n"
            "  --cluster <command> [args...] [opts...]\n"
            "                     Cluster Manager command and arguments (see below).\n"
            "  --verbose          Verbose mode.\n"
            "  --no-auth-warning  Don't show warning message when using password on command\n"
            "                     line interface.\n"
            "  --help             Output this help and exit.\n"
            "  --version          Output version and exit.\n"
            "\n");
    /* Using another fprintf call to avoid -Woverlength-strings compile warning */
    fprintf(target,
            "Cluster Manager Commands:\n"
            "  Use --cluster help to list all available cluster manager commands.\n"

Review comment (suggestion):
Maybe we can mention that `--hotkeys` is equivalent to `--hotkeys-count 16`?

Also we can avoid "number of Sample" because it samples all the keys in the database. N is the number of hot keys to report.

```suggestion
            "  --hotkeys          Sample keys looking for hot keys.\n"
            "                     Only works when maxmemory-policy is *lfu.\n"
            "                     This is equivalent to --hotkeys-count 16.\n"
            "  --hotkeys-count <n> Sample keys looking for the n most hot keys.\n"
            "                     Only works when maxmemory-policy is *lfu.\n"
```

Code after:
            "                     -i to change the interval), then produces a single output\n"
            "                     and exits.\n"
            "  --latency-history  Like --latency but tracking latency changes over time.\n"
            "                     Default time interval is 15 sec. Change it using -i.\n"
            "  --latency-dist     Shows latency as a spectrum, requires xterm 256 colors.\n"
            "                     Default time interval is 1 sec. Change it using -i.\n"
            "  --lru-test <keys>  Simulate a cache workload with an 80-20 distribution.\n"
            "  --replica          Simulate a replica showing commands received from the primaries.\n"
            "  --rdb <filename>   Transfer an RDB dump from remote server to local file.\n"
            "                     Use filename of \"-\" to write to stdout.\n"
            "  --functions-rdb <filename> Like --rdb but only get the functions (not the keys)\n"
            "                     when getting the RDB dump file.\n"
            "  --pipe             Transfer raw RESP protocol from stdin to server.\n"
            "  --pipe-timeout <n> In --pipe mode, abort with error if after sending all data.\n"
            "                     no reply is received within <n> seconds.\n"
            "                     Default timeout: %d. Use 0 to wait forever.\n",
            CLI_DEFAULT_PIPE_TIMEOUT);
    fprintf(target,
            "  --bigkeys          Sample keys looking for keys with many elements (complexity).\n"
            "  --memkeys          Sample keys looking for keys consuming a lot of memory.\n"
            "  --memkeys-samples <n> Sample keys looking for keys consuming a lot of memory.\n"
            "                     And define number of key elements to sample\n"
            "  --hotkeys          Sample keys looking for hot keys.\n"
            "                     Only works when maxmemory-policy is *lfu.\n"
            "                     This is equivalent to --hotkeys-count 16.\n"
            "  --hotkeys-count <n> Sample keys looking for the n most hot keys.\n"
            "                     Only works when maxmemory-policy is *lfu.\n"
            "  --scan             List all keys using the SCAN command.\n"
            "  --pattern <pat>    Keys pattern when using the --scan, --bigkeys or --hotkeys\n"
            "                     options (default: *).\n"
            "  --count <count>    Count option when using the --scan, --bigkeys or --hotkeys (default: 10).\n"
            "  --quoted-pattern <pat> Same as --pattern, but the specified string can be\n"
            "                         quoted, in order to pass an otherwise non binary-safe string.\n"
            "  --intrinsic-latency <sec> Run a test to measure intrinsic system latency.\n"
            "                     The test will run for the specified amount of seconds.\n"
            "  --eval <file>      Send an EVAL command using the Lua script at <file>.\n"
            "  --ldb              Used with --eval enable the Server Lua debugger.\n"
            "  --ldb-sync-mode    Like --ldb but uses the synchronous Lua debugger, in\n"
            "                     this mode the server is blocked and script changes are\n"
            "                     not rolled back from the server memory.\n"
            "  --cluster <command> [args...] [opts...]\n"
            "                     Cluster Manager command and arguments (see below).\n"
            "  --verbose          Verbose mode.\n"
            "  --no-auth-warning  Don't show warning message when using password on command\n"
            "                     line interface.\n"
            "  --help             Output this help and exit.\n"
            "  --version          Output version and exit.\n"
            "\n");
    /* Using another fprintf call to avoid -Woverlength-strings compile warning */
    fprintf(target,
            "Cluster Manager Commands:\n"