From d02dd30a1fb0895bac9f6139bf8ef9418a26b69d Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 27 Jan 2016 11:23:34 -0800 Subject: Also dynamic sizing for num_clients on performance tests --- test/cpp/qps/driver.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index acb265b308..4ef70a2570 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -31,24 +31,24 @@ * */ +#include #include #include -#include #include -#include -#include -#include #include #include +#include +#include +#include #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 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 -- cgit v1.2.3