diff options
Diffstat (limited to 'test/cpp/qps/driver.cc')
-rw-r--r-- | test/cpp/qps/driver.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 66269ae757..4914e19cb2 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -31,24 +31,24 @@ * */ +#include <deque> #include <list> #include <thread> -#include <deque> #include <vector> -#include <grpc/support/alloc.h> -#include <grpc/support/log.h> -#include <grpc/support/host_port.h> #include <grpc++/client_context.h> #include <grpc++/create_channel.h> +#include <grpc/support/alloc.h> +#include <grpc/support/host_port.h> +#include <grpc/support/log.h> #include "src/core/support/env.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" #include "test/cpp/qps/driver.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qps_worker.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" using std::list; using std::thread; @@ -142,6 +142,12 @@ std::unique_ptr<ScenarioResult> RunScenario( } } + // if num_clients is set to <=0, do dynamic sizing: all workers + // except for servers are clients + if (num_clients <= 0) { + num_clients = workers.size() - num_servers; + } + // TODO(ctiller): support running multiple configurations, and binpack // client/server pairs // to available workers |