|
|
@ -124,7 +124,7 @@ UserDataClient userDataClient(grpc::CreateChannel("localhost:50052", grpc::Insec |
|
|
|
|
|
|
|
|
|
|
|
//Leaderboard Reported implementation.
|
|
|
|
//Leaderboard Reported implementation.
|
|
|
|
void UserDatabaseReporter::ReportQPS(const ScenarioResult& result) const { |
|
|
|
void UserDatabaseReporter::ReportQPS(const ScenarioResult& result) const { |
|
|
|
double qps = result.latencies.Count() / |
|
|
|
auto qps = result.latencies.Count() / |
|
|
|
average(result.client_resources, |
|
|
|
average(result.client_resources, |
|
|
|
[](ResourceUsage u) { return u.wall_time; }); |
|
|
|
[](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); |
|
|
|
userDataClient.setConfigs(result.client_config, result.server_config); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UserDatabaseReporter::ReportQPSPerCore(const ScenarioResult& result, |
|
|
|
void UserDatabaseReporter::ReportQPSPerCore(const ScenarioResult& result) const { |
|
|
|
const ServerConfig& server_config) const { |
|
|
|
auto qps = result.latencies.Count() / |
|
|
|
double qps = result.latencies.Count() / |
|
|
|
average(result.client_resources, |
|
|
|
average(result.client_resources, |
|
|
|
[](ResourceUsage u) { return u.wall_time; }); |
|
|
|
[](ResourceUsage u) { return u.wall_time; }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double qpsPerCore = qps / server_config.threads(); |
|
|
|
auto qpsPerCore = qps / result.server_config.threads(); |
|
|
|
|
|
|
|
|
|
|
|
userDataClient.setQPSPerCore(qpsPerCore); |
|
|
|
userDataClient.setQPSPerCore(qpsPerCore); |
|
|
|
userDataClient.setConfigs(result.client_config, result.server_config); |
|
|
|
userDataClient.setConfigs(result.client_config, result.server_config); |
|
|
|