Changing warning to mention #reqs rather than test time

This commit is contained in:
Nora Shoemaker 2015-07-17 14:10:21 -07:00
parent eeba12144c
commit c1c177addc
1 changed files with 12 additions and 7 deletions

View File

@ -1427,19 +1427,24 @@ int main(int argc, char **argv) {
if (config.is_rate_mode() && (int)config.max_concurrent_streams != 0 && if (config.is_rate_mode() && (int)config.max_concurrent_streams != 0 &&
(n_time != c_time) && config.nreqs != 1 && config.nconns != 0) { (n_time != c_time) && config.nreqs != 1 && config.nconns != 0) {
if ((int)config.nreqs < config.nconns) { if ((int)config.nreqs < config.nconns) {
std::cerr << "-C, -n: warning: two different test times are being set. " std::cerr << "-C, -n: warning: number of requests conflict. "
<< std::endl; << std::endl;
std::cerr << "The test will run for " << c_time << " seconds." std::cerr << "The test will create "
<< std::endl; << (config.max_concurrent_streams * config.nconns)
} else { << " total requests." << std::endl;
std::cout << "-C, -n: warning: two different test times are being set. " }
else {
std::cout << "-C, -n: warning: number of requests conflict. "
<< std::endl; << std::endl;
std::cout << "The smaller of the two will be chosen and the test will " std::cout << "The smaller of the two will be chosen and the test will "
<< "run for " << std::min(n_time, c_time) << " seconds." << "create "
<< std::endl; << std::min(config.nreqs,
(size_t)(config.max_concurrent_streams * config.nconns))
<< " total requests." << std::endl;
} }
} }
Headers shared_nva; Headers shared_nva;
shared_nva.emplace_back(":scheme", config.scheme); shared_nva.emplace_back(":scheme", config.scheme);
if (config.port != config.default_port) { if (config.port != config.default_port) {