diff options
Diffstat (limited to 'test/cpp/qps/qps_driver.cc')
-rw-r--r-- | test/cpp/qps/qps_driver.cc | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 008830de4e..281e2e8119 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -31,12 +31,15 @@ * */ +#include <memory> +#include <set> + #include <gflags/gflags.h> #include <grpc/support/log.h> #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" -#include "test/cpp/util/test_config.h" +#include "test/cpp/util/benchmark_config.h" DEFINE_int32(num_clients, 1, "Number of client binaries"); DEFINE_int32(num_servers, 1, "Number of server binaries"); @@ -68,9 +71,10 @@ using grpc::testing::ServerType; using grpc::testing::RpcType; using grpc::testing::ResourceUsage; -int main(int argc, char** argv) { - grpc::testing::InitTest(&argc, &argv, true); +namespace grpc { +namespace testing { +static void QpsDriver() { RpcType rpc_type; GPR_ASSERT(RpcType_Parse(FLAGS_rpc_type, &rpc_type)); @@ -107,9 +111,20 @@ int main(int argc, char** argv) { client_config, FLAGS_num_clients, server_config, FLAGS_num_servers, FLAGS_warmup_seconds, FLAGS_benchmark_seconds, FLAGS_local_workers); - ReportQPSPerCore(*result, server_config); - ReportLatency(*result); - ReportTimes(*result); + GetReporter()->ReportQPS(*result); + GetReporter()->ReportQPSPerCore(*result, server_config); + GetReporter()->ReportLatency(*result); + GetReporter()->ReportTimes(*result); +} + +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + grpc::testing::InitBenchmark(&argc, &argv, true); + + signal(SIGPIPE, SIG_IGN); + grpc::testing::QpsDriver(); return 0; } |