nghttp, nghttpd, h2load: Same indentation with nghttpx
This commit is contained in:
parent
a08ce38bcf
commit
5f36d91afd
|
@ -851,61 +851,61 @@ void print_help(std::ostream &out) {
|
||||||
print_usage(out);
|
print_usage(out);
|
||||||
|
|
||||||
out << R"(
|
out << R"(
|
||||||
<URI> Specify URI to access. Multiple URIs can be
|
<URI> Specify URI to access. Multiple URIs can be specified.
|
||||||
specified. URIs are used in this order for each
|
URIs are used in this order for each client. All URIs
|
||||||
client. All URIs are used, then first URI is
|
are used, then first URI is used and then 2nd URI, and
|
||||||
used and then 2nd URI, and so on. The scheme,
|
so on. The scheme, host and port in the subsequent
|
||||||
host and port in the subsequent URIs, if present,
|
URIs, if present, are ignored. Those in the first URI
|
||||||
are ignored. Those in the first URI are used
|
are used solely.
|
||||||
solely.
|
|
||||||
Options:
|
Options:
|
||||||
-n, --requests=<N> Number of requests.
|
-n, --requests=<N>
|
||||||
Default: )" << config.nreqs << R"(
|
Number of requests.
|
||||||
-c, --clients=<N> Number of concurrent clients.
|
Default: )" << config.nreqs << R"(
|
||||||
Default: )" << config.nclients << R"(
|
-c, --clients=<N>
|
||||||
-t, --threads=<N> Number of native threads.
|
Number of concurrent clients.
|
||||||
Default: )" << config.nthreads << R"(
|
Default: )" << config.nclients << R"(
|
||||||
|
-t, --threads=<N>
|
||||||
|
Number of native threads.
|
||||||
|
Default: )" << config.nthreads << R"(
|
||||||
-i, --input-file=<FILE>
|
-i, --input-file=<FILE>
|
||||||
Path of a file with multiple URIs are seperated
|
Path of a file with multiple URIs are seperated by EOLs.
|
||||||
by EOLs. This option will disable URIs getting
|
This option will disable URIs getting from command-line.
|
||||||
from command-line. If '-' is given as <FILE>,
|
If '-' is given as <FILE>, URIs will be read from stdin.
|
||||||
URIs will be read from stdin. URIs are used in
|
URIs are used in this order for each client. All URIs
|
||||||
this order for each client. All URIs are used,
|
are used, then first URI is used and then 2nd URI, and
|
||||||
then first URI is used and then 2nd URI, and so
|
so on. The scheme, host and port in the subsequent
|
||||||
on. The scheme, host and port in the subsequent
|
URIs, if present, are ignored. Those in the first URI
|
||||||
URIs, if present, are ignored. Those in the
|
are used solely.
|
||||||
first URI are used solely.
|
|
||||||
-m, --max-concurrent-streams=(auto|<N>)
|
-m, --max-concurrent-streams=(auto|<N>)
|
||||||
Max concurrent streams to issue per session. If
|
Max concurrent streams to issue per session. If "auto"
|
||||||
"auto" is given, the number of given URIs is
|
is given, the number of given URIs is used.
|
||||||
used.
|
Default: auto
|
||||||
Default: auto
|
|
||||||
-w, --window-bits=<N>
|
-w, --window-bits=<N>
|
||||||
Sets the stream level initial window size to
|
Sets the stream level initial window size to (2**<N>)-1.
|
||||||
(2**<N>)-1. For SPDY, 2**<N> is used instead.
|
For SPDY, 2**<N> is used instead.
|
||||||
-W, --connection-window-bits=<N>
|
-W, --connection-window-bits=<N>
|
||||||
Sets the connection level initial window size to
|
Sets the connection level initial window size to
|
||||||
(2**<N>)-1. For SPDY, if <N> is strictly less
|
(2**<N>)-1. For SPDY, if <N> is strictly less than 16,
|
||||||
than 16, this option is ignored. Otherwise
|
this option is ignored. Otherwise 2**<N> is used for
|
||||||
2**<N> is used for SPDY.
|
SPDY.
|
||||||
-H, --header=<HEADER>
|
-H, --header=<HEADER>
|
||||||
Add/Override a header to the requests.
|
Add/Override a header to the requests.
|
||||||
-p, --no-tls-proto=<PROTOID>
|
-p, --no-tls-proto=<PROTOID>
|
||||||
Specify ALPN identifier of the protocol to be
|
Specify ALPN identifier of the protocol to be used when
|
||||||
used when accessing http URI without SSL/TLS.)";
|
accessing http URI without SSL/TLS.)";
|
||||||
#ifdef HAVE_SPDYLAY
|
#ifdef HAVE_SPDYLAY
|
||||||
out << R"(
|
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
|
||||||
#else // !HAVE_SPDYLAY
|
|
||||||
out << R"(
|
out << R"(
|
||||||
Available protocol: )";
|
Available protocol: )";
|
||||||
#endif // !HAVE_SPDYLAY
|
#endif // !HAVE_SPDYLAY
|
||||||
out << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
out << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
||||||
Default: )" << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
Default: )" << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
||||||
-v, --verbose Output debug information.
|
-v, --verbose
|
||||||
--version Display version information and exit.
|
Output debug information.
|
||||||
-h, --help Display this help and exit.)" << std::endl;
|
--version Display version information and exit.
|
||||||
|
-h, --help Display this help and exit.)" << std::endl;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
127
src/nghttp.cc
127
src/nghttp.cc
|
@ -2224,75 +2224,78 @@ namespace {
|
||||||
void print_help(std::ostream &out) {
|
void print_help(std::ostream &out) {
|
||||||
print_usage(out);
|
print_usage(out);
|
||||||
out << R"(
|
out << R"(
|
||||||
<URI> Specify URI to access.
|
<URI> Specify URI to access.
|
||||||
Options:
|
Options:
|
||||||
-v, --verbose Print debug information such as reception and
|
-v, --verbose
|
||||||
transmission of frames and name/value pairs.
|
Print debug information such as reception and
|
||||||
Specifying this option multiple times increases
|
transmission of frames and name/value pairs. Specifying
|
||||||
verbosity.
|
this option multiple times increases verbosity.
|
||||||
-n, --null-out Discard downloaded data.
|
-n, --null-out
|
||||||
-O, --remote-name Save download data in the current directory. The
|
Discard downloaded data.
|
||||||
filename is dereived from URI. If URI ends with
|
-O, --remote-name
|
||||||
'/', 'index.html' is used as a filename. Not
|
Save download data in the current directory. The
|
||||||
implemented yet.
|
filename is dereived from URI. If URI ends with '/',
|
||||||
-t, --timeout=<N> Timeout each request after <N> seconds.
|
'index.html' is used as a filename. Not implemented
|
||||||
|
yet.
|
||||||
|
-t, --timeout=<SEC>
|
||||||
|
Timeout each request after <SEC> seconds.
|
||||||
-w, --window-bits=<N>
|
-w, --window-bits=<N>
|
||||||
Sets the stream level initial window size to
|
Sets the stream level initial window size to 2**<N>-1.
|
||||||
2**<N>-1.
|
|
||||||
-W, --connection-window-bits=<N>
|
-W, --connection-window-bits=<N>
|
||||||
Sets the connection level initial window size to
|
Sets the connection level initial window size to
|
||||||
2**<N>-1.
|
2**<N>-1.
|
||||||
-a, --get-assets Download assets such as stylesheets, images and
|
-a, --get-assets
|
||||||
script files linked from the downloaded resource.
|
Download assets such as stylesheets, images and script
|
||||||
Only links whose origins are the same with the
|
files linked from the downloaded resource. Only links
|
||||||
linking resource will be downloaded. nghttp
|
whose origins are the same with the linking resource
|
||||||
prioritizes resources using HTTP/2 dependency
|
will be downloaded. nghttp prioritizes resources using
|
||||||
based priority. The priority order, from highest
|
HTTP/2 dependency based priority. The priority order,
|
||||||
to lowest, is html itself, css, javascript and
|
from highest to lowest, is html itself, css, javascript
|
||||||
images.
|
and images.
|
||||||
-s, --stat Print statistics.
|
-s, --stat Print statistics.
|
||||||
-H, --header=<HEADER>
|
-H, --header=<HEADER>
|
||||||
Add a header to the requests. Example:
|
Add a header to the requests. Example: -H':method: PUT'
|
||||||
-H':method: PUT'
|
--cert=<CERT>
|
||||||
--cert=<CERT> Use the specified client certificate file. The
|
Use the specified client certificate file. The file
|
||||||
file must be in PEM format.
|
must be in PEM format.
|
||||||
--key=<KEY> Use the client private key file. The file must
|
--key=<KEY> Use the client private key file. The file must be in
|
||||||
be in PEM format.
|
PEM format.
|
||||||
-d, --data=<FILE> Post FILE to server. If '-' is given, data will
|
-d, --data=<FILE>
|
||||||
be read from stdin.
|
Post FILE to server. If '-' is given, data will be read
|
||||||
-m, --multiply=<N> Request each URI <N> times. By default, same URI
|
from stdin.
|
||||||
is not requested twice. This option disables it
|
-m, --multiply=<N>
|
||||||
too.
|
Request each URI <N> times. By default, same URI is not
|
||||||
-u, --upgrade Perform HTTP Upgrade for HTTP/2. This option is
|
requested twice. This option disables it too.
|
||||||
ignored if the request URI has https scheme. If
|
-u, --upgrade
|
||||||
-d is used, the HTTP upgrade request is performed
|
Perform HTTP Upgrade for HTTP/2. This option is ignored
|
||||||
with OPTIONS method.
|
if the request URI has https scheme. If -d is used, the
|
||||||
|
HTTP upgrade request is performed with OPTIONS method.
|
||||||
-p, --weight=<WEIGHT>
|
-p, --weight=<WEIGHT>
|
||||||
Sets priority group weight. The valid value
|
Sets priority group weight. The valid value range is
|
||||||
range is [)" << NGHTTP2_MIN_WEIGHT << ", "
|
[)" << NGHTTP2_MIN_WEIGHT << ", " << NGHTTP2_MAX_WEIGHT
|
||||||
<< NGHTTP2_MAX_WEIGHT << R"(], inclusive.
|
<< R"(], inclusive.
|
||||||
Default: )" << NGHTTP2_DEFAULT_WEIGHT << R"(
|
Default: )" << NGHTTP2_DEFAULT_WEIGHT << R"(
|
||||||
-M, --peer-max-concurrent-streams=<N>
|
-M, --peer-max-concurrent-streams=<N>
|
||||||
Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value
|
Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value of
|
||||||
of remote endpoint as if it is received in
|
remote endpoint as if it is received in SETTINGS frame.
|
||||||
SETTINGS frame. The default is large enough as
|
The default is large enough as it is seen as unlimited.
|
||||||
it is seen as unlimited.
|
-c, --header-table-size=<SIZE>
|
||||||
-c, --header-table-size=<N>
|
Specify decoder header table size.
|
||||||
Specify decoder header table size.
|
-b, --padding=<N>
|
||||||
-b, --padding=<N> Add at most <N> bytes to a frame payload as
|
Add at most <N> bytes to a frame payload as padding.
|
||||||
padding. Specify 0 to disable padding.
|
Specify 0 to disable padding.
|
||||||
-r, --har=<FILE> Output HTTP transactions <FILE> in HAR format.
|
-r, --har=<FILE>
|
||||||
If '-' is given, data is written to stdout.
|
Output HTTP transactions <FILE> in HAR format. If '-'
|
||||||
--color Force colored log output.
|
is given, data is written to stdout.
|
||||||
--continuation Send large header to test CONTINUATION.
|
--color Force colored log output.
|
||||||
|
--continuation
|
||||||
|
Send large header to test CONTINUATION.
|
||||||
--no-content-length
|
--no-content-length
|
||||||
Don't send content-length header field.
|
Don't send content-length header field.
|
||||||
--no-dep Don't send dependency based priority hint to
|
--no-dep Don't send dependency based priority hint to server.
|
||||||
server.
|
--dep-idle Use idle streams as anchor nodes to express priority.
|
||||||
--dep-idle Use idle streams as anchor nodes to express
|
--version Display version information and exit.
|
||||||
priority.
|
-h, --help Display this help and exit.)" << std::endl;
|
||||||
--version Display version information and exit.
|
|
||||||
-h, --help Display this help and exit.)" << std::endl;
|
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -90,54 +90,55 @@ namespace {
|
||||||
void print_help(std::ostream &out) {
|
void print_help(std::ostream &out) {
|
||||||
print_usage(out);
|
print_usage(out);
|
||||||
out << R"(
|
out << R"(
|
||||||
<PORT> Specify listening port number.
|
<PORT> Specify listening port number.
|
||||||
<PRIVATE_KEY> Set path to server's private key. Required
|
<PRIVATE_KEY>
|
||||||
unless --no-tls is specified.
|
Set path to server's private key. Required unless
|
||||||
<CERT> Set path to server's certificate. Required
|
--no-tls is specified.
|
||||||
unless --no-tls is specified.
|
<CERT> Set path to server's certificate. Required unless
|
||||||
|
--no-tls is specified.
|
||||||
Options:
|
Options:
|
||||||
-D, --daemon Run in a background. If -D is used, the current
|
-D, --daemon
|
||||||
working directory is changed to '/'. Therefore
|
Run in a background. If -D is used, the current working
|
||||||
if this option is used, -d option must be
|
directory is changed to '/'. Therefore if this option
|
||||||
specified.
|
is used, -d option must be specified.
|
||||||
-V, --verify-client
|
-V, --verify-client
|
||||||
The server sends a client certificate request.
|
The server sends a client certificate request. If the
|
||||||
If the client did not return a certificate, the
|
client did not return a certificate, the handshake is
|
||||||
handshake is terminated. Currently, this option
|
terminated. Currently, this option just requests a
|
||||||
just requests a client certificate and does not
|
client certificate and does not verify it.
|
||||||
verify it.
|
|
||||||
-d, --htdocs=<PATH>
|
-d, --htdocs=<PATH>
|
||||||
Specify document root. If this option is not
|
Specify document root. If this option is not specified,
|
||||||
specified, the document root is the current
|
the document root is the current working directory.
|
||||||
working directory.
|
-v, --verbose
|
||||||
-v, --verbose Print debug information such as reception/
|
Print debug information such as reception/ transmission
|
||||||
transmission of frames and name/value pairs.
|
of frames and name/value pairs.
|
||||||
--no-tls Disable SSL/TLS.
|
--no-tls Disable SSL/TLS.
|
||||||
-c, --header-table-size=<N>
|
-c, --header-table-size=<SIZE>
|
||||||
Specify decoder header table size.
|
Specify decoder header table size.
|
||||||
--color Force colored log output.
|
--color Force colored log output.
|
||||||
-p, --push=<PATH>=<PUSH_PATH,...>
|
-p, --push=<PATH>=<PUSH_PATH,...>
|
||||||
Push resources <PUSH_PATH>s when <PATH> is
|
Push resources <PUSH_PATH>s when <PATH> is requested.
|
||||||
requested. This option can be used repeatedly to
|
This option can be used repeatedly to specify multiple
|
||||||
specify multiple push configurations. <PATH> and
|
push configurations. <PATH> and <PUSH_PATH>s are
|
||||||
<PUSH_PATH>s are relative to document root. See
|
relative to document root. See --htdocs option.
|
||||||
--htdocs option. Example: -p/=/foo.png
|
Example: -p/=/foo.png -p/doc=/bar.css
|
||||||
-p/doc=/bar.css
|
-b, --padding=<N>
|
||||||
-b, --padding=<N> Add at most <N> bytes to a frame payload as
|
Add at most <N> bytes to a frame payload as padding.
|
||||||
padding. Specify 0 to disable padding.
|
Specify 0 to disable padding.
|
||||||
-n, --workers=<CORE>
|
-n, --workers=<N>
|
||||||
Set the number of worker threads.
|
Set the number of worker threads.
|
||||||
Default: 1
|
Default: 1
|
||||||
-e, --error-gzip Make error response gzipped.
|
-e, --error-gzip
|
||||||
|
Make error response gzipped.
|
||||||
--dh-param-file=<PATH>
|
--dh-param-file=<PATH>
|
||||||
Path to file that contains DH parameters in PEM
|
Path to file that contains DH parameters in PEM format.
|
||||||
format. Without this option, DHE cipher suites
|
Without this option, DHE cipher suites are not
|
||||||
are not available.
|
available.
|
||||||
--early-response Start sending response when request HEADERS is
|
--early-response
|
||||||
received, rather than complete request is
|
Start sending response when request HEADERS is received,
|
||||||
received.
|
rather than complete request is received.
|
||||||
--version Display version information and exit.
|
--version Display version information and exit.
|
||||||
-h, --help Display this help and exit.)" << std::endl;
|
-h, --help Display this help and exit.)" << std::endl;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue