aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2016-01-27 11:23:34 -0800
committerGravatar Vijay Pai <vpai@google.com>2016-01-27 11:23:34 -0800
commitd02dd30a1fb0895bac9f6139bf8ef9418a26b69d (patch)
tree708fd15d4ceddcdea65676f4857fa3e52e72c85b /test/cpp/qps
parent32baa5e62209b67ff247e4a03803c70cb364b457 (diff)
Also dynamic sizing for num_clients on performance tests
Diffstat (limited to 'test/cpp/qps')
-rw-r--r--test/cpp/qps/driver.cc16
1 files 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 <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