nghttp, nghttpd, h2load: Same indentation with nghttpx

This commit is contained in:
Tatsuhiro Tsujikawa 2015-01-16 00:00:38 +09:00
parent a08ce38bcf
commit 5f36d91afd
3 changed files with 152 additions and 148 deletions

View File

@ -851,61 +851,61 @@ void print_help(std::ostream &out) {
print_usage(out);
out << R"(
<URI> Specify URI to access. Multiple URIs can be
specified. URIs are used in this order for each
client. All URIs are used, then first URI is
used and then 2nd URI, and so on. The scheme,
host and port in the subsequent URIs, if present,
are ignored. Those in the first URI are used
solely.
<URI> Specify URI to access. Multiple URIs can be specified.
URIs are used in this order for each client. All URIs
are used, then first URI is used and then 2nd URI, and
so on. The scheme, host and port in the subsequent
URIs, if present, are ignored. Those in the first URI
are used solely.
Options:
-n, --requests=<N> Number of requests.
Default: )" << config.nreqs << R"(
-c, --clients=<N> Number of concurrent clients.
Default: )" << config.nclients << R"(
-t, --threads=<N> Number of native threads.
Default: )" << config.nthreads << R"(
-n, --requests=<N>
Number of requests.
Default: )" << config.nreqs << R"(
-c, --clients=<N>
Number of concurrent clients.
Default: )" << config.nclients << R"(
-t, --threads=<N>
Number of native threads.
Default: )" << config.nthreads << R"(
-i, --input-file=<FILE>
Path of a file with multiple URIs are seperated
by EOLs. This option will disable URIs getting
from command-line. If '-' is given as <FILE>,
URIs will be read from stdin. URIs are used in
this order for each client. All URIs are used,
then first URI is used and then 2nd URI, and so
on. The scheme, host and port in the subsequent
URIs, if present, are ignored. Those in the
first URI are used solely.
Path of a file with multiple URIs are seperated by EOLs.
This option will disable URIs getting from command-line.
If '-' is given as <FILE>, URIs will be read from stdin.
URIs are used in this order for each client. All URIs
are used, then first URI is used and then 2nd URI, and
so on. The scheme, host and port in the subsequent
URIs, if present, are ignored. Those in the first URI
are used solely.
-m, --max-concurrent-streams=(auto|<N>)
Max concurrent streams to issue per session. If
"auto" is given, the number of given URIs is
used.
Default: auto
Max concurrent streams to issue per session. If "auto"
is given, the number of given URIs is used.
Default: auto
-w, --window-bits=<N>
Sets the stream level initial window size to
(2**<N>)-1. For SPDY, 2**<N> is used instead.
Sets the stream level initial window size to (2**<N>)-1.
For SPDY, 2**<N> is used instead.
-W, --connection-window-bits=<N>
Sets the connection level initial window size to
(2**<N>)-1. For SPDY, if <N> is strictly less
than 16, this option is ignored. Otherwise
2**<N> is used for SPDY.
Sets the connection level initial window size to
(2**<N>)-1. For SPDY, if <N> is strictly less than 16,
this option is ignored. Otherwise 2**<N> is used for
SPDY.
-H, --header=<HEADER>
Add/Override a header to the requests.
Add/Override a header to the requests.
-p, --no-tls-proto=<PROTOID>
Specify ALPN identifier of the protocol to be
used when accessing http URI without SSL/TLS.)";
Specify ALPN identifier of the protocol to be used when
accessing http URI without SSL/TLS.)";
#ifdef HAVE_SPDYLAY
out << R"(
Available protocols: spdy/2, spdy/3, spdy/3.1 and
)";
#else // !HAVE_SPDYLAY
Available protocols: spdy/2, spdy/3, spdy/3.1 and )";
#else // !HAVE_SPDYLAY
out << R"(
Available protocol: )";
Available protocol: )";
#endif // !HAVE_SPDYLAY
out << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
Default: )" << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
-v, --verbose Output debug information.
--version Display version information and exit.
-h, --help Display this help and exit.)" << std::endl;
Default: )" << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
-v, --verbose
Output debug information.
--version Display version information and exit.
-h, --help Display this help and exit.)" << std::endl;
}
} // namespace

View File

@ -2224,75 +2224,78 @@ namespace {
void print_help(std::ostream &out) {
print_usage(out);
out << R"(
<URI> Specify URI to access.
<URI> Specify URI to access.
Options:
-v, --verbose Print debug information such as reception and
transmission of frames and name/value pairs.
Specifying this option multiple times increases
verbosity.
-n, --null-out Discard downloaded data.
-O, --remote-name Save download data in the current directory. The
filename is dereived from URI. If URI ends with
'/', 'index.html' is used as a filename. Not
implemented yet.
-t, --timeout=<N> Timeout each request after <N> seconds.
-v, --verbose
Print debug information such as reception and
transmission of frames and name/value pairs. Specifying
this option multiple times increases verbosity.
-n, --null-out
Discard downloaded data.
-O, --remote-name
Save download data in the current directory. The
filename is dereived from URI. If URI ends with '/',
'index.html' is used as a filename. Not implemented
yet.
-t, --timeout=<SEC>
Timeout each request after <SEC> seconds.
-w, --window-bits=<N>
Sets the stream level initial window size to
2**<N>-1.
Sets the stream level initial window size to 2**<N>-1.
-W, --connection-window-bits=<N>
Sets the connection level initial window size to
2**<N>-1.
-a, --get-assets Download assets such as stylesheets, images and
script files linked from the downloaded resource.
Only links whose origins are the same with the
linking resource will be downloaded. nghttp
prioritizes resources using HTTP/2 dependency
based priority. The priority order, from highest
to lowest, is html itself, css, javascript and
images.
-s, --stat Print statistics.
Sets the connection level initial window size to
2**<N>-1.
-a, --get-assets
Download assets such as stylesheets, images and script
files linked from the downloaded resource. Only links
whose origins are the same with the linking resource
will be downloaded. nghttp prioritizes resources using
HTTP/2 dependency based priority. The priority order,
from highest to lowest, is html itself, css, javascript
and images.
-s, --stat Print statistics.
-H, --header=<HEADER>
Add a header to the requests. Example:
-H':method: PUT'
--cert=<CERT> Use the specified client certificate file. The
file must be in PEM format.
--key=<KEY> Use the client private key file. The file must
be in PEM format.
-d, --data=<FILE> Post FILE to server. If '-' is given, data will
be read from stdin.
-m, --multiply=<N> Request each URI <N> times. By default, same URI
is not requested twice. This option disables it
too.
-u, --upgrade Perform HTTP Upgrade for HTTP/2. This option is
ignored if the request URI has https scheme. If
-d is used, the HTTP upgrade request is performed
with OPTIONS method.
Add a header to the requests. Example: -H':method: PUT'
--cert=<CERT>
Use the specified client certificate file. The file
must be in PEM format.
--key=<KEY> Use the client private key file. The file must be in
PEM format.
-d, --data=<FILE>
Post FILE to server. If '-' is given, data will be read
from stdin.
-m, --multiply=<N>
Request each URI <N> times. By default, same URI is not
requested twice. This option disables it too.
-u, --upgrade
Perform HTTP Upgrade for HTTP/2. This option is ignored
if the request URI has https scheme. If -d is used, the
HTTP upgrade request is performed with OPTIONS method.
-p, --weight=<WEIGHT>
Sets priority group weight. The valid value
range is [)" << NGHTTP2_MIN_WEIGHT << ", "
<< NGHTTP2_MAX_WEIGHT << R"(], inclusive.
Default: )" << NGHTTP2_DEFAULT_WEIGHT << R"(
Sets priority group weight. The valid value range is
[)" << NGHTTP2_MIN_WEIGHT << ", " << NGHTTP2_MAX_WEIGHT
<< R"(], inclusive.
Default: )" << NGHTTP2_DEFAULT_WEIGHT << R"(
-M, --peer-max-concurrent-streams=<N>
Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value
of remote endpoint as if it is received in
SETTINGS frame. The default is large enough as
it is seen as unlimited.
-c, --header-table-size=<N>
Specify decoder header table size.
-b, --padding=<N> Add at most <N> bytes to a frame payload as
padding. Specify 0 to disable padding.
-r, --har=<FILE> Output HTTP transactions <FILE> in HAR format.
If '-' is given, data is written to stdout.
--color Force colored log output.
--continuation Send large header to test CONTINUATION.
Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value of
remote endpoint as if it is received in SETTINGS frame.
The default is large enough as it is seen as unlimited.
-c, --header-table-size=<SIZE>
Specify decoder header table size.
-b, --padding=<N>
Add at most <N> bytes to a frame payload as padding.
Specify 0 to disable padding.
-r, --har=<FILE>
Output HTTP transactions <FILE> in HAR format. If '-'
is given, data is written to stdout.
--color Force colored log output.
--continuation
Send large header to test CONTINUATION.
--no-content-length
Don't send content-length header field.
--no-dep Don't send dependency based priority hint to
server.
--dep-idle Use idle streams as anchor nodes to express
priority.
--version Display version information and exit.
-h, --help Display this help and exit.)" << std::endl;
Don't send content-length header field.
--no-dep Don't send dependency based priority hint to server.
--dep-idle Use idle streams as anchor nodes to express priority.
--version Display version information and exit.
-h, --help Display this help and exit.)" << std::endl;
}
} // namespace

View File

@ -90,54 +90,55 @@ namespace {
void print_help(std::ostream &out) {
print_usage(out);
out << R"(
<PORT> Specify listening port number.
<PRIVATE_KEY> Set path to server's private key. Required
unless --no-tls is specified.
<CERT> Set path to server's certificate. Required
unless --no-tls is specified.
<PORT> Specify listening port number.
<PRIVATE_KEY>
Set path to server's private key. Required unless
--no-tls is specified.
<CERT> Set path to server's certificate. Required unless
--no-tls is specified.
Options:
-D, --daemon Run in a background. If -D is used, the current
working directory is changed to '/'. Therefore
if this option is used, -d option must be
specified.
-D, --daemon
Run in a background. If -D is used, the current working
directory is changed to '/'. Therefore if this option
is used, -d option must be specified.
-V, --verify-client
The server sends a client certificate request.
If the client did not return a certificate, the
handshake is terminated. Currently, this option
just requests a client certificate and does not
verify it.
The server sends a client certificate request. If the
client did not return a certificate, the handshake is
terminated. Currently, this option just requests a
client certificate and does not verify it.
-d, --htdocs=<PATH>
Specify document root. If this option is not
specified, the document root is the current
working directory.
-v, --verbose Print debug information such as reception/
transmission of frames and name/value pairs.
--no-tls Disable SSL/TLS.
-c, --header-table-size=<N>
Specify decoder header table size.
--color Force colored log output.
Specify document root. If this option is not specified,
the document root is the current working directory.
-v, --verbose
Print debug information such as reception/ transmission
of frames and name/value pairs.
--no-tls Disable SSL/TLS.
-c, --header-table-size=<SIZE>
Specify decoder header table size.
--color Force colored log output.
-p, --push=<PATH>=<PUSH_PATH,...>
Push resources <PUSH_PATH>s when <PATH> is
requested. This option can be used repeatedly to
specify multiple push configurations. <PATH> and
<PUSH_PATH>s are relative to document root. See
--htdocs option. Example: -p/=/foo.png
-p/doc=/bar.css
-b, --padding=<N> Add at most <N> bytes to a frame payload as
padding. Specify 0 to disable padding.
-n, --workers=<CORE>
Set the number of worker threads.
Default: 1
-e, --error-gzip Make error response gzipped.
Push resources <PUSH_PATH>s when <PATH> is requested.
This option can be used repeatedly to specify multiple
push configurations. <PATH> and <PUSH_PATH>s are
relative to document root. See --htdocs option.
Example: -p/=/foo.png -p/doc=/bar.css
-b, --padding=<N>
Add at most <N> bytes to a frame payload as padding.
Specify 0 to disable padding.
-n, --workers=<N>
Set the number of worker threads.
Default: 1
-e, --error-gzip
Make error response gzipped.
--dh-param-file=<PATH>
Path to file that contains DH parameters in PEM
format. Without this option, DHE cipher suites
are not available.
--early-response Start sending response when request HEADERS is
received, rather than complete request is
received.
--version Display version information and exit.
-h, --help Display this help and exit.)" << std::endl;
Path to file that contains DH parameters in PEM format.
Without this option, DHE cipher suites are not
available.
--early-response
Start sending response when request HEADERS is received,
rather than complete request is received.
--version Display version information and exit.
-h, --help Display this help and exit.)" << std::endl;
}
} // namespace