Merge pull request #1171 from nghttp2/h2load-rate-and-duration

h2load: -r and --duration are mutually exclusive
This commit is contained in:
Tatsuhiro Tsujikawa 2018-04-28 01:23:22 +09:00 committed by GitHub
commit c3ecd44592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -1856,7 +1856,7 @@ Options:
connections per period. When the rate is 0, the program
will run as it normally does, creating connections at
whatever variable rate it wants. The default value for
this option is 0.
this option is 0. -r and -D are mutually exclusive.
--rate-period=<DURATION>
Specifies the time period between creating connections.
The period must be a positive number, representing the
@ -1865,7 +1865,8 @@ Options:
option is 1s.
-D, --duration=<N>
Specifies the main duration for the measurements in case
of timing-based benchmarking.
of timing-based benchmarking. -D and -r are mutually
exclusive.
--warm-up-time=<DURATION>
Specifies the time period before starting the actual
measurements, in case of timing-based benchmarking.
@ -2298,6 +2299,11 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE);
}
if (config.is_timing_based_mode() && config.is_rate_mode()) {
std::cerr << "-r, -D: they are mutually exclusive." << std::endl;
exit(EXIT_FAILURE);
}
if (config.nreqs == 0 && !config.is_timing_based_mode()) {
std::cerr << "-n: the number of requests must be strictly greater than 0 "
"if timing-based test is not being run."