nghttp, nghttpd, h2load: Same indentation with nghttpx
This commit is contained in:
parent
a08ce38bcf
commit
5f36d91afd
|
@ -851,59 +851,59 @@ 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.
|
||||
-n, --requests=<N>
|
||||
Number of requests.
|
||||
Default: )" << config.nreqs << R"(
|
||||
-c, --clients=<N> Number of concurrent clients.
|
||||
-c, --clients=<N>
|
||||
Number of concurrent clients.
|
||||
Default: )" << config.nclients << R"(
|
||||
-t, --threads=<N> Number of native threads.
|
||||
-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.
|
||||
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.
|
||||
(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.
|
||||
-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
|
||||
)";
|
||||
Available protocols: spdy/2, spdy/3, spdy/3.1 and )";
|
||||
#else // !HAVE_SPDYLAY
|
||||
out << R"(
|
||||
Available protocol: )";
|
||||
#endif // !HAVE_SPDYLAY
|
||||
out << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
||||
Default: )" << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
||||
-v, --verbose Output debug information.
|
||||
-v, --verbose
|
||||
Output debug information.
|
||||
--version Display version information and exit.
|
||||
-h, --help Display this help and exit.)" << std::endl;
|
||||
}
|
||||
|
|
107
src/nghttp.cc
107
src/nghttp.cc
|
@ -2226,71 +2226,74 @@ void print_help(std::ostream &out) {
|
|||
out << R"(
|
||||
<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.
|
||||
-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.
|
||||
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>
|
||||
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.
|
||||
-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.
|
||||
--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.
|
||||
--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;
|
||||
}
|
||||
|
|
|
@ -91,51 +91,52 @@ 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.
|
||||
<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.
|
||||
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>
|
||||
-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>
|
||||
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.
|
||||
-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.
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue