changed --ms to --time
Former-commit-id: d7cada0f38668f67eb307172a3e91599b1f00a24
This commit is contained in:
parent
45c4220b7f
commit
1b0a1f8fc7
@ -706,12 +706,13 @@ int parseOptions(int argc, const char **argv) {
|
||||
if (!strcmp(argv[i],"-c") || !strcmp(argv[i],"--clients")) {
|
||||
if (lastarg) goto invalid;
|
||||
config.numclients = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i],"-k")) {
|
||||
if (lastarg) goto invalid;
|
||||
config.keepalive = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i],"--ms")) {
|
||||
} else if (!strcmp(argv[i],"--time")) {
|
||||
if (lastarg) goto invalid;
|
||||
config.period_ms = atoi(argv[++i]);
|
||||
if (config.period_ms <= 0) {
|
||||
printf("Warning: Invalid value for thread time. Defaulting to 5000ms.\n");
|
||||
config.period_ms = 5000;
|
||||
}
|
||||
} else if (!strcmp(argv[i],"-h") || !strcmp(argv[i],"--host")) {
|
||||
if (lastarg) goto invalid;
|
||||
config.hostip = strdup(argv[++i]);
|
||||
@ -770,7 +771,7 @@ int parseOptions(int argc, const char **argv) {
|
||||
if (lastarg) goto invalid;
|
||||
config.max_threads = atoi(argv[++i]);
|
||||
if (config.max_threads > MAX_THREADS) {
|
||||
printf("WARNING: too many threads, limiting threads to %d.\n", MAX_THREADS);
|
||||
printf("Warning: Too many threads, limiting threads to %d.\n", MAX_THREADS);
|
||||
config.max_threads = MAX_THREADS;
|
||||
} else if (config.max_threads <= 0) {
|
||||
printf("Warning: Invalid value for max threads. Defaulting to %d.\n", MAX_THREADS);
|
||||
@ -800,17 +801,16 @@ invalid:
|
||||
usage:
|
||||
printf(
|
||||
"Usage: keydb-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests>] [-k <boolean>]\n\n"
|
||||
" -h <hostname> Server hostname (default 127.0.0.1)\n"
|
||||
" -p <port> Server port (default 6379)\n"
|
||||
" -h, --host <hostname> Server hostname (default 127.0.0.1)\n"
|
||||
" -p, --port <port> Server port (default 6379)\n"
|
||||
" -s <socket> Server socket (overrides host and port)\n"
|
||||
" --ms <milliseconds> Time between spinning up new client threads\n"
|
||||
" --time <time> Time between spinning up new client threads, in milliseconds\n"
|
||||
" -a <password> Password for Redis Auth\n"
|
||||
" --user <username> Used to send ACL style 'AUTH username pass'. Needs -a.\n"
|
||||
" -c <clients> Number of parallel connections (default 50)\n"
|
||||
" -n <requests> Total number of requests (default 100000)\n"
|
||||
" -d <size> Data size of SET/GET value in bytes (default 3)\n"
|
||||
" --dbnum <db> SELECT the specified db number (default 0)\n"
|
||||
" --threads <num> Enable multi-thread mode.\n"
|
||||
" --cluster Enable cluster mode.\n"
|
||||
" --enable-tracking Send CLIENT TRACKING on before starting benchmark.\n"
|
||||
" -k <boolean> 1=keep alive 0=reconnect (default 1)\n"
|
||||
@ -830,23 +830,7 @@ usage:
|
||||
" -l Loop. Run the tests forever\n"
|
||||
" -t <tests> Only run the comma separated list of tests. The test\n"
|
||||
" names are the same as the ones produced as output.\n"
|
||||
" -I Idle mode. Just open N idle connections and wait.\n\n"
|
||||
"Examples:\n\n"
|
||||
" Run the benchmark with the default configuration against 127.0.0.1:6379:\n"
|
||||
" $ keydb-benchmark\n\n"
|
||||
" Use 20 parallel clients, for a total of 100k requests, against 192.168.1.1:\n"
|
||||
" $ keydb-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"
|
||||
" $ keydb-benchmark -t set -n 1000000 -r 100000000\n\n"
|
||||
" Benchmark 127.0.0.1:6379 for a few commands producing CSV output:\n"
|
||||
" $ keydb-benchmark -t ping,set,get -n 100000 --csv\n\n"
|
||||
" Benchmark a specific command line:\n"
|
||||
" $ keydb-benchmark -r 10000 -n 10000 eval 'return redis.call(\"ping\")' 0\n\n"
|
||||
" Fill a list with 10000 random elements:\n"
|
||||
" $ keydb-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"
|
||||
);
|
||||
" -I Idle mode. Just open N idle connections and wait.\n\n");
|
||||
exit(exit_status);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user