in wb/wb.c [3240:3356]
static void usage(const char *progname)
{
#ifdef _WAF_BENCH_ // print waf-bench version
copyright();
#endif //_WAF_BENCH_ // print waf-bench version
fprintf(stderr, "Usage: %s [options] [http"
#ifdef USE_SSL
"[s]"
#endif
"://]hostname[:port]/path\n", progname);
/* 80 column ruler: ********************************************************************************
*/
fprintf(stderr, "Options are:\n");
fprintf(stderr, " -n requests Number of requests to perform\n");
fprintf(stderr, " -c concurrency Number of multiple requests to make at a time\n");
fprintf(stderr, " -t timelimit Seconds to max. to spend on benchmarking\n");
#ifdef _WAF_BENCH_ // remove 50000 limits when specifying "-t"
fprintf(stderr, " default: %d, namely test %d seconds if \"-n\" is not specified.\n",
DEFAULT_TEST_TIME,DEFAULT_TEST_TIME );
// we don't need the following 50,000 limitation implication
#else
fprintf(stderr, " This implies -n 50000\n");
#endif //_WAF_BENCH_ // remove 50000 limits when specifying "-t"
fprintf(stderr, " -s timeout Seconds to max. wait for each response\n");
fprintf(stderr, " Default is 30 seconds\n");
fprintf(stderr, " -b windowsize Size of TCP send/receive buffer, in bytes\n");
fprintf(stderr, " -B address Address to bind to when making outgoing connections\n");
fprintf(stderr, " -p postfile File containing data to POST. Remember also to set -T\n");
fprintf(stderr, " -u putfile File containing data to PUT. Remember also to set -T\n");
fprintf(stderr, " -T content-type Content-type header to use for POST/PUT data, eg.\n");
fprintf(stderr, " 'application/x-www-form-urlencoded'\n");
fprintf(stderr, " Default is 'text/plain'\n");
fprintf(stderr, " -v verbosity How much troubleshooting info to print\n");
fprintf(stderr, " -w Print out results in HTML tables\n");
fprintf(stderr, " -i Use HEAD instead of GET\n");
fprintf(stderr, " -x attributes String to insert as table attributes\n");
fprintf(stderr, " -y attributes String to insert as tr attributes\n");
fprintf(stderr, " -z attributes String to insert as td or th attributes\n");
fprintf(stderr, " -C attribute Add cookie, eg. 'Apache=1234'. (repeatable)\n");
fprintf(stderr, " -H attribute Add Arbitrary header line, eg. 'Accept-Encoding: gzip'\n");
fprintf(stderr, " Inserted after all normal header lines. (repeatable)\n");
fprintf(stderr, " -A attribute Add Basic WWW Authentication, the attributes\n");
fprintf(stderr, " are a colon separated username and password.\n");
fprintf(stderr, " -P attribute Add Basic Proxy Authentication, the attributes\n");
fprintf(stderr, " are a colon separated username and password.\n");
fprintf(stderr, " -X proxy:port Proxyserver and port number to use\n");
fprintf(stderr, " -V Print version number and exit\n");
fprintf(stderr, " -k Use HTTP KeepAlive feature\n");
fprintf(stderr, " -d Do not show percentiles served table.\n");
fprintf(stderr, " -S Do not show confidence estimators and warnings.\n");
fprintf(stderr, " -q Do not show progress when doing more than 150 requests\n");
fprintf(stderr, " -l Accept variable document length (use this for dynamic pages)\n");
fprintf(stderr, " -g filename Output collected data to gnuplot format file.\n");
fprintf(stderr, " -e filename Output CSV file with percentages served\n");
fprintf(stderr, " -r Don't exit on socket receive errors.\n");
fprintf(stderr, " -m method Method name\n");
fprintf(stderr, " -h Display usage information (this message)\n");
#ifdef USE_SSL
#ifndef OPENSSL_NO_SSL2
#define SSL2_HELP_MSG "SSL2, "
#else
#define SSL2_HELP_MSG ""
#endif
#ifndef OPENSSL_NO_SSL3
#define SSL3_HELP_MSG "SSL3, "
#else
#define SSL3_HELP_MSG ""
#endif
#ifdef HAVE_TLSV1_X
#define TLS1_X_HELP_MSG ", TLS1.1, TLS1.2"
#else
#define TLS1_X_HELP_MSG ""
#endif
#ifdef HAVE_TLSEXT
fprintf(stderr, " -I Disable TLS Server Name Indication (SNI) extension\n");
#endif
fprintf(stderr, " -Z ciphersuite Specify SSL/TLS cipher suite (See openssl ciphers)\n");
fprintf(stderr, " -f protocol Specify SSL/TLS protocol\n");
fprintf(stderr, " (" SSL2_HELP_MSG SSL3_HELP_MSG "TLS1" TLS1_X_HELP_MSG " or ALL)\n");
#endif
#ifdef _WAF_BENCH_ // print waf-bench new usage
fprintf(stderr,"\033[1;33m\n"); // Yellow
fprintf(stderr, "New options for wb:\n");
fprintf(stderr,"\033[0m\n"); // no color
fprintf(stderr, " -F pkt_file File of packet seperated by \\0 or a leading size\n");
fprintf(stderr, " note: \"-n\" now is the total times to be sent for pkt_file\n");
fprintf(stderr, " -G max_size Maximum output file size (in MB, default=0:unlimited)\n");
fprintf(stderr, " -j interval Progress report interval (set 0 to disable, default=1)\n");
fprintf(stderr, " -J sub_string Replace the sub_string in pkt content with <seq#> of wb\n");
fprintf(stderr, " -K Keep body during save (default: save header only)\n");
fprintf(stderr, " -o msg_file Save received http messages to filename\n");
fprintf(stderr, " -Q max_count # of packets in packet file (default=0:all pkts in file)\n");
fprintf(stderr, " -U URL_prefix Add prefix \"/URL_prefix<seq#>/\" to each request URL\n");
fprintf(stderr, " -W stats_num Window of stats, number of stats values (default=50000)\n");
fprintf(stderr, " -1 (for testing) Don't append Host:localhost if absent (\n");
fprintf(stderr, " default to add)\n");
fprintf(stderr, " -2 option (for testing) Don't append Connection:close if option is 0, \n");
fprintf(stderr, " Append connection:close to those packets without connection attribution if option is 1,\n");
fprintf(stderr, " Append or replace connection attribution to close for any packets if option is 2\n");
fprintf(stderr, " -3 (for testing) Use micro-second granularity in output,\n");
fprintf(stderr, " default disabled\n");
/*
fprintf(stderr, " -D min_time Lower bound of stats histogram(us) (default: 0 us)\n");
fprintf(stderr, " -U max_time Upper bound of stats histogram(us) (default: 10000 us)\n");
fprintf(stderr, " -N (TBD) Number of threads\n");
fprintf(stderr, " -3-9 (TBD)\n");
*/
#endif //_WAF_BENCH_ // print waf-bench new usage
exit(EINVAL);
}