diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 75e0e3ebd8d..5642ec8d2d5 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -124,7 +124,7 @@ UserDataClient userDataClient(grpc::CreateChannel("localhost:50052", grpc::Insec //Leaderboard Reported implementation. void UserDatabaseReporter::ReportQPS(const ScenarioResult& result) const { - double qps = result.latencies.Count() / + auto qps = result.latencies.Count() / average(result.client_resources, [](ResourceUsage u) { return u.wall_time; }); @@ -132,13 +132,12 @@ void UserDatabaseReporter::ReportQPS(const ScenarioResult& result) const { userDataClient.setConfigs(result.client_config, result.server_config); } -void UserDatabaseReporter::ReportQPSPerCore(const ScenarioResult& result, - const ServerConfig& server_config) const { - double qps = result.latencies.Count() / - average(result.client_resources, - [](ResourceUsage u) { return u.wall_time; }); +void UserDatabaseReporter::ReportQPSPerCore(const ScenarioResult& result) const { + auto qps = result.latencies.Count() / + average(result.client_resources, + [](ResourceUsage u) { return u.wall_time; }); - double qpsPerCore = qps / server_config.threads(); + auto qpsPerCore = qps / result.server_config.threads(); userDataClient.setQPSPerCore(qpsPerCore); userDataClient.setConfigs(result.client_config, result.server_config); diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index 48da77039aa..ea09c385853 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -114,8 +114,7 @@ class UserDatabaseReporter : public Reporter { std::string access_token_; std::string test_name_; void ReportQPS(const ScenarioResult& result) const GRPC_OVERRIDE; - void ReportQPSPerCore(const ScenarioResult& result, - const ServerConfig& config) const GRPC_OVERRIDE; + void ReportQPSPerCore(const ScenarioResult& result) const GRPC_OVERRIDE; void ReportLatency(const ScenarioResult& result) const GRPC_OVERRIDE; void ReportTimes(const ScenarioResult& result) const GRPC_OVERRIDE; void Flush() const;