diff options
author | 2016-05-31 13:00:33 -0700 | |
---|---|---|
committer | 2016-05-31 13:00:33 -0700 | |
commit | dbd03b5e2d97f869089b2165edd2c419101b1c83 (patch) | |
tree | 3168330f7f4836ab82f6c3261ffac67f7a61cd90 /test/cpp/qps | |
parent | 0d6196025e62aea5aabc6341459f2c370e264230 (diff) |
Make client_channels be across all clients, not per-client
Diffstat (limited to 'test/cpp/qps')
-rw-r--r-- | test/cpp/qps/driver.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 04b2b453f9..da47a985b8 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -306,6 +306,7 @@ std::unique_ptr<ScenarioResult> RunScenario( // clients is array rather than std::vector to avoid gcc-4.4 issues // where class contained in std::vector must have a copy constructor auto* clients = new ClientData[num_clients]; + size_t channels_allocated = 0; for (size_t i = 0; i < num_clients; i++) { const auto& worker = workers[i + num_servers]; gpr_log(GPR_INFO, "Starting client on %s (worker #%d)", worker.c_str(), @@ -341,6 +342,13 @@ std::unique_ptr<ScenarioResult> RunScenario( } } + size_t num_channels = + (i == num_clients - 1) + ? channels_allocated - client_config.client_channels() + : client_config.client_channels() / num_clients; + channels_allocated += num_channels; + per_client_config.set_client_channels(num_channels); + ClientArgs args; *args.mutable_setup() = per_client_config; clients[i].stream = |