h2load: Remove trailing white spaces
This commit is contained in:
parent
da3bd559a9
commit
04aaaa3821
|
@ -20,8 +20,8 @@ requests
|
||||||
likely the network level failures or stream was reset by
|
likely the network level failures or stream was reset by
|
||||||
RST_STREAM.
|
RST_STREAM.
|
||||||
timeout
|
timeout
|
||||||
The number of requests whose connection timed out before they
|
The number of requests whose connection timed out before they were
|
||||||
were completed.
|
completed.
|
||||||
|
|
||||||
status codes
|
status codes
|
||||||
The number of status code h2load received.
|
The number of status code h2load received.
|
||||||
|
|
|
@ -75,7 +75,7 @@ Config::Config()
|
||||||
: data_length(-1), addrs(nullptr), nreqs(1), nclients(1), nthreads(1),
|
: data_length(-1), addrs(nullptr), nreqs(1), nclients(1), nthreads(1),
|
||||||
max_concurrent_streams(-1), window_bits(30), connection_window_bits(30),
|
max_concurrent_streams(-1), window_bits(30), connection_window_bits(30),
|
||||||
rate(0), nconns(0), conn_active_timeout(0), conn_inactivity_timeout(0),
|
rate(0), nconns(0), conn_active_timeout(0), conn_inactivity_timeout(0),
|
||||||
no_tls_proto(PROTO_HTTP2), data_fd(-1), port(0), default_port(0),
|
no_tls_proto(PROTO_HTTP2), data_fd(-1), port(0), default_port(0),
|
||||||
verbose(false) {}
|
verbose(false) {}
|
||||||
|
|
||||||
Config::~Config() {
|
Config::~Config() {
|
||||||
|
@ -120,7 +120,7 @@ RequestStat::RequestStat() : data_offset(0), completed(false) {}
|
||||||
Stats::Stats(size_t req_todo)
|
Stats::Stats(size_t req_todo)
|
||||||
: req_todo(0), req_started(0), req_done(0), req_success(0),
|
: req_todo(0), req_started(0), req_done(0), req_success(0),
|
||||||
req_status_success(0), req_failed(0), req_error(0), req_timedout(0),
|
req_status_success(0), req_failed(0), req_error(0), req_timedout(0),
|
||||||
bytes_total(0), bytes_head(0), bytes_body(0), status(),
|
bytes_total(0), bytes_head(0), bytes_body(0), status(),
|
||||||
req_stats(req_todo) {}
|
req_stats(req_todo) {}
|
||||||
|
|
||||||
Stream::Stream() : status_success(-1) {}
|
Stream::Stream() : status_success(-1) {}
|
||||||
|
@ -183,7 +183,7 @@ void second_timeout_w_cb(struct ev_loop *loop, ev_timer *w, int revents) {
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// Called when an a connection has been inactive for a set period of time
|
// Called when an a connection has been inactive for a set period of time
|
||||||
// or a fixed amount of time after all requests have been made on a
|
// or a fixed amount of time after all requests have been made on a
|
||||||
// connection
|
// connection
|
||||||
void conn_timeout_cb(EV_P_ ev_timer *w, int revents) {
|
void conn_timeout_cb(EV_P_ ev_timer *w, int revents) {
|
||||||
|
@ -1144,8 +1144,7 @@ Options:
|
||||||
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: )"
|
Default: )" << NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
||||||
<< NGHTTP2_CLEARTEXT_PROTO_VERSION_ID << R"(
|
|
||||||
-d, --data=<PATH>
|
-d, --data=<PATH>
|
||||||
Post FILE to server. The request method is changed to
|
Post FILE to server. The request method is changed to
|
||||||
POST.
|
POST.
|
||||||
|
@ -1168,25 +1167,24 @@ Options:
|
||||||
for this option is 0. The -n option is not required if
|
for this option is 0. The -n option is not required if
|
||||||
the -C option is being used.
|
the -C option is being used.
|
||||||
-T, --connection-active-timeout=<N>
|
-T, --connection-active-timeout=<N>
|
||||||
Specifies the maximum time that h2load is willing to
|
Specifies the maximum time that h2load is willing to
|
||||||
keep a connection open, regardless of the activity on
|
keep a connection open, regardless of the activity on
|
||||||
said connection. <N> must be a positive integer,
|
said connection. <N> must be a positive integer,
|
||||||
specifying the number of seconds to wait. When no
|
specifying the number of seconds to wait. When no
|
||||||
timeout value is set (either active or inactive), h2load
|
timeout value is set (either active or inactive), h2load
|
||||||
will keep a connection open indefinitely, waiting for a
|
will keep a connection open indefinitely, waiting for a
|
||||||
response.
|
response.
|
||||||
-N, --connection-inactivity-timeout=<N>
|
-N, --connection-inactivity-timeout=<N>
|
||||||
Specifies the amount of time that h2load is willing to
|
Specifies the amount of time that h2load is willing to
|
||||||
wait to see activity on a given connection. <N> must be
|
wait to see activity on a given connection. <N> must be
|
||||||
a positive integer, specifying the number of seconds to
|
a positive integer, specifying the number of seconds to
|
||||||
wait. When no timeout value is set (either active or
|
wait. When no timeout value is set (either active or
|
||||||
inactive), h2load will keep a connection open
|
inactive), h2load will keep a connection open
|
||||||
indefinitely, waiting for a response.
|
indefinitely, waiting for a response.
|
||||||
-v, --verbose
|
-v, --verbose
|
||||||
Output debug information.
|
Output debug information.
|
||||||
--version Display version information and exit.
|
--version Display version information and exit.
|
||||||
-h, --help Display this help and exit.)"
|
-h, --help Display this help and exit.)" << std::endl;
|
||||||
<< std::endl;
|
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -1224,7 +1222,7 @@ int main(int argc, char **argv) {
|
||||||
{"connection-inactivity-timeout", required_argument, nullptr, 'N'},
|
{"connection-inactivity-timeout", required_argument, nullptr, 'N'},
|
||||||
{nullptr, 0, nullptr, 0}};
|
{nullptr, 0, nullptr, 0}};
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
auto c = getopt_long(argc, argv, "hvW:c:d:m:n:p:t:w:H:i:r:C:T:N:",
|
auto c = getopt_long(argc, argv, "hvW:c:d:m:n:p:t:w:H:i:r:C:T:N:",
|
||||||
long_options, &option_index);
|
long_options, &option_index);
|
||||||
if (c == -1) {
|
if (c == -1) {
|
||||||
break;
|
break;
|
||||||
|
@ -1442,9 +1440,8 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.nconns == 0 && !nreqs_set_manually) {
|
if (config.nconns == 0 && !nreqs_set_manually) {
|
||||||
std::cerr
|
std::cerr << "-r: the rate option must be used with either the -n option "
|
||||||
<< "-r: the rate option must be used with either the -n option "
|
"or the -C option." << std::endl;
|
||||||
"or the -C option." << std::endl;
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1799,7 +1796,7 @@ finished in )" << util::format_duration(duration) << ", " << rps << " req/s, "
|
||||||
requests: )" << stats.req_todo << " total, " << stats.req_started
|
requests: )" << stats.req_todo << " total, " << stats.req_started
|
||||||
<< " started, " << stats.req_done << " done, "
|
<< " started, " << stats.req_done << " done, "
|
||||||
<< stats.req_status_success << " succeeded, " << stats.req_failed
|
<< stats.req_status_success << " succeeded, " << stats.req_failed
|
||||||
<< " failed, " << stats.req_error << " errored, "
|
<< " failed, " << stats.req_error << " errored, "
|
||||||
<< stats.req_timedout << R"( timeout
|
<< stats.req_timedout << R"( timeout
|
||||||
status codes: )" << stats.status[2] << " 2xx, " << stats.status[3] << " 3xx, "
|
status codes: )" << stats.status[2] << " 2xx, " << stats.status[3] << " 3xx, "
|
||||||
<< stats.status[4] << " 4xx, " << stats.status[5] << R"( 5xx
|
<< stats.status[4] << " 4xx, " << stats.status[5] << R"( 5xx
|
||||||
|
|
Loading…
Reference in New Issue