aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/driver.cc
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-04-11 01:27:32 +0200
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-04-11 01:53:09 +0200
commitb7c2035e83a9b3e346f1fd37f9ad55c2070fb02e (patch)
tree6d4703d352f4f3204415d6785df52320d3d14a9b /test/cpp/qps/driver.cc
parent27a0dc0208e90b6463049df16da6c35216eab0aa (diff)
parent05f2d9f8267d69bfeb60f52446385a1955eddd93 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into the-purge-2
Conflicts: test/cpp/end2end/async_end2end_test.cc test/cpp/end2end/end2end_test.cc test/cpp/interop/client.cc
Diffstat (limited to 'test/cpp/qps/driver.cc')
-rw-r--r--test/cpp/qps/driver.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc
index 64a53496ae..f44883783d 100644
--- a/test/cpp/qps/driver.cc
+++ b/test/cpp/qps/driver.cc
@@ -74,7 +74,9 @@ static vector<string> get_hosts(const string& name) {
ScenarioResult RunScenario(const ClientConfig& initial_client_config,
size_t num_clients,
const ServerConfig& server_config,
- size_t num_servers) {
+ size_t num_servers,
+ int warmup_seconds,
+ int benchmark_seconds) {
// ClientContext allocator (all are destroyed at scope exit)
list<ClientContext> contexts;
auto alloc_context = [&contexts]() {
@@ -146,7 +148,7 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config,
// Let everything warmup
gpr_log(GPR_INFO, "Warming up");
gpr_timespec start = gpr_now();
- gpr_sleep_until(gpr_time_add(start, gpr_time_from_seconds(5)));
+ gpr_sleep_until(gpr_time_add(start, gpr_time_from_seconds(warmup_seconds)));
// Start a run
gpr_log(GPR_INFO, "Starting");
@@ -171,7 +173,7 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config,
// Wait some time
gpr_log(GPR_INFO, "Running");
- gpr_sleep_until(gpr_time_add(start, gpr_time_from_seconds(15)));
+ gpr_sleep_until(gpr_time_add(start, gpr_time_from_seconds(benchmark_seconds)));
// Finish a run
ScenarioResult result;