aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/qps_json_driver.cc
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2017-08-24 10:42:27 -0700
committerGravatar Vijay Pai <vpai@google.com>2017-10-19 14:29:13 -0700
commit088112fea12ec364990909cda3a96e7d792480b3 (patch)
tree1fde83a8b7332891ccbb409da0ac97abd3ebe68d /test/cpp/qps/qps_json_driver.cc
parentac581ee24b24d9088d8755ce45daa4ec471ab951 (diff)
Create inproc version of QPS test and add a few simple tests of this to standard testing suite.
Diffstat (limited to 'test/cpp/qps/qps_json_driver.cc')
-rw-r--r--test/cpp/qps/qps_json_driver.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc
index cca59f64d8..1672527426 100644
--- a/test/cpp/qps/qps_json_driver.cc
+++ b/test/cpp/qps/qps_json_driver.cc
@@ -30,6 +30,7 @@
#include "test/cpp/qps/driver.h"
#include "test/cpp/qps/parse_json.h"
#include "test/cpp/qps/report.h"
+#include "test/cpp/qps/server.h"
#include "test/cpp/util/test_config.h"
#include "test/cpp/util/test_credentials_provider.h"
@@ -64,6 +65,7 @@ DEFINE_string(json_file_out, "", "File to write the JSON output to.");
DEFINE_string(credential_type, grpc::testing::kInsecureCredentialsType,
"Credential type for communication with workers");
+DEFINE_bool(run_inproc, false, "Perform an in-process transport test");
namespace grpc {
namespace testing {
@@ -75,8 +77,9 @@ static std::unique_ptr<ScenarioResult> RunAndReport(const Scenario& scenario,
RunScenario(scenario.client_config(), scenario.num_clients(),
scenario.server_config(), scenario.num_servers(),
scenario.warmup_seconds(), scenario.benchmark_seconds(),
- scenario.spawn_local_worker_count(),
- FLAGS_qps_server_target_override, FLAGS_credential_type);
+ !FLAGS_run_inproc ? scenario.spawn_local_worker_count() : -2,
+ FLAGS_qps_server_target_override, FLAGS_credential_type,
+ FLAGS_run_inproc);
// Amend the result with scenario config. Eventually we should adjust
// RunScenario contract so we don't need to touch the result here.