Merge pull request #1171 from nghttp2/h2load-rate-and-duration
h2load: -r and --duration are mutually exclusive
This commit is contained in:
commit
c3ecd44592
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue