@@ -407,11 +407,13 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
407
407
o_tls_cacert,
408
408
o_tls_skip_verify,
409
409
o_tls_sni,
410
- o_hdr_file_prefix
410
+ o_hdr_file_prefix,
411
+ o_help
411
412
};
412
413
413
414
static struct option long_options[] = {
414
415
{ " server" , 1 , 0 , ' s' },
416
+ { " host" , 1 , 0 , ' h' },
415
417
{ " port" , 1 , 0 , ' p' },
416
418
{ " unix-socket" , 1 , 0 , ' S' },
417
419
{ " ipv4" , 0 , 0 , ' 4' },
@@ -468,7 +470,7 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
468
470
{ " wait-timeout" , 1 , 0 , o_wait_timeout },
469
471
{ " json-out-file" , 1 , 0 , o_json_out_file },
470
472
{ " cluster-mode" , 0 , 0 , o_cluster_mode },
471
- { " help" , 0 , 0 , ' h ' },
473
+ { " help" , 0 , 0 , o_help },
472
474
{ " version" , 0 , 0 , ' v' },
473
475
{ " command" , 1 , 0 , o_command },
474
476
{ " command-key-pattern" , 1 , 0 , o_command_key_pattern },
@@ -483,7 +485,7 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
483
485
" vs:S:p:P:o:x:DRn:c:t:d:a:h:46" , long_options, &option_index)) != -1 )
484
486
{
485
487
switch (c) {
486
- case ' h ' :
488
+ case o_help :
487
489
return -1 ;
488
490
break ;
489
491
case ' v' :
@@ -494,6 +496,7 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
494
496
puts (" There is NO WARRANTY, to the extent permitted by law." );
495
497
exit (0 );
496
498
case ' s' :
499
+ case ' h' :
497
500
cfg->server = optarg;
498
501
break ;
499
502
case ' S' :
@@ -883,7 +886,8 @@ void usage() {
883
886
" A memcache/redis NoSQL traffic generator and performance benchmarking tool.\n "
884
887
" \n "
885
888
" Connection and General Options:\n "
886
- " -s, --server=ADDR Server address (default: localhost)\n "
889
+ " -h, --host=ADDR Server address (default: localhost)\n "
890
+ " -s, --server=ADDR Same as --host\n "
887
891
" -p, --port=PORT Server port (default: 6379)\n "
888
892
" -S, --unix-socket=SOCKET UNIX Domain socket name (default: none)\n "
889
893
" -4, --ipv4 Force IPv4 address resolution.\n "
0 commit comments