aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-05-19 18:29:35 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-05-19 18:29:35 -0700
commit6ba29ba3fbfd2870ce57413f560f5470dfad2a7c (patch)
tree62a72040b9bd55af9e0458b2443e568652e00ea9 /test/cpp
parent386643e23a2678ed762e0775766122512b65a30d (diff)
Added the client and server configurations to the bench results proto.
The added configurations also include the host of both parties. This is useful for reporting.
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/qps/driver.cc11
-rw-r--r--test/cpp/qps/driver.h2
-rw-r--r--test/cpp/qps/qpstest.proto2
3 files changed, 15 insertions, 0 deletions
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc
index 9f7d3b56a4..83f70e612d 100644
--- a/test/cpp/qps/driver.cc
+++ b/test/cpp/qps/driver.cc
@@ -89,6 +89,11 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config,
return &contexts.back();
};
+ // To be added to the result, containing the final configuration used for
+ // client and config (incluiding host, etc.)
+ ClientConfig result_client_config;
+ ServerConfig result_server_config;
+
// Get client, server lists
auto workers = get_hosts("QPS_WORKERS");
ClientConfig client_config = initial_client_config;
@@ -127,6 +132,8 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config,
sd.stub = std::move(Worker::NewStub(
CreateChannel(workers[i], InsecureCredentials(), ChannelArguments())));
ServerArgs args;
+ result_server_config = server_config;
+ result_server_config.set_host(workers[i]);
*args.mutable_setup() = server_config;
sd.stream = std::move(sd.stub->RunServer(alloc_context()));
GPR_ASSERT(sd.stream->Write(args));
@@ -156,6 +163,8 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config,
cd.stub = std::move(Worker::NewStub(CreateChannel(
workers[i + num_servers], InsecureCredentials(), ChannelArguments())));
ClientArgs args;
+ result_client_config = client_config;
+ result_client_config.set_host(workers[i + num_servers]);
*args.mutable_setup() = client_config;
cd.stream = std::move(cd.stub->RunTest(alloc_context()));
GPR_ASSERT(cd.stream->Write(args));
@@ -197,6 +206,8 @@ ScenarioResult RunScenario(const ClientConfig& initial_client_config,
// Finish a run
ScenarioResult result;
+ result.client_config = result_client_config;
+ result.server_config = result_server_config;
gpr_log(GPR_INFO, "Finishing");
for (auto server = servers.begin(); server != servers.end(); server++) {
GPR_ASSERT(server->stream->Write(server_mark));
diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h
index eb7119a89d..4c7d52f1ea 100644
--- a/test/cpp/qps/driver.h
+++ b/test/cpp/qps/driver.h
@@ -49,6 +49,8 @@ struct ScenarioResult {
Histogram latencies;
std::vector<ResourceUsage> client_resources;
std::vector<ResourceUsage> server_resources;
+ ClientConfig client_config;
+ ServerConfig server_config;
};
ScenarioResult RunScenario(const grpc::testing::ClientConfig& client_config,
diff --git a/test/cpp/qps/qpstest.proto b/test/cpp/qps/qpstest.proto
index 1553ef5f07..122a7df1ac 100644
--- a/test/cpp/qps/qpstest.proto
+++ b/test/cpp/qps/qpstest.proto
@@ -102,6 +102,7 @@ message ClientConfig {
// only for async client:
optional int32 async_client_threads = 7;
optional RpcType rpc_type = 8 [default=UNARY];
+ optional string host = 9;
}
// Request current stats
@@ -129,6 +130,7 @@ message ServerConfig {
required ServerType server_type = 1;
optional int32 threads = 2 [default=1];
optional bool enable_ssl = 3 [default=false];
+ optional string host = 4;
}
message ServerArgs {