edited report

pull/2151/head
Siddharth Rakesh 10 years ago
parent c3cd4780df
commit 373ad4d0d0
  1. 20
      test/cpp/qps/report.cc
  2. 6
      test/cpp/qps/report.h

@ -123,8 +123,8 @@ void PerfDbReporter::ReportQPS(const ScenarioResult& result) const {
average(result.client_resources,
[](ResourceUsage u) { return u.wall_time; });
perfDbClient.setQPS(qps);
perfDbClient.setConfigs(result.client_config, result.server_config);
perfDbClient_.setQPS(qps);
perfDbClient_.setConfigs(result.client_config, result.server_config);
}
void PerfDbReporter::ReportQPSPerCore(const ScenarioResult& result) const {
@ -134,18 +134,18 @@ void PerfDbReporter::ReportQPSPerCore(const ScenarioResult& result) const {
auto qpsPerCore = qps / result.server_config.threads();
perfDbClient.setQPS(qps);
perfDbClient.setQPSPerCore(qpsPerCore);
perfDbClient.setConfigs(result.client_config, result.server_config);
perfDbClient_.setQPS(qps);
perfDbClient_.setQPSPerCore(qpsPerCore);
perfDbClient_.setConfigs(result.client_config, result.server_config);
}
void PerfDbReporter::ReportLatency(const ScenarioResult& result) const {
perfDbClient.setLatencies(result.latencies.Percentile(50) / 1000,
perfDbClient_.setLatencies(result.latencies.Percentile(50) / 1000,
result.latencies.Percentile(90) / 1000,
result.latencies.Percentile(95) / 1000,
result.latencies.Percentile(99) / 1000,
result.latencies.Percentile(99.9) / 1000);
perfDbClient.setConfigs(result.client_config, result.server_config);
perfDbClient_.setConfigs(result.client_config, result.server_config);
}
void PerfDbReporter::ReportTimes(const ScenarioResult& result) const {
@ -166,14 +166,14 @@ void PerfDbReporter::ReportTimes(const ScenarioResult& result) const {
sum(result.client_resources,
[](ResourceUsage u) { return u.wall_time; });
perfDbClient.setTimes(serverSystemTime, serverUserTime,
perfDbClient_.setTimes(serverSystemTime, serverUserTime,
clientSystemTime, clientUserTime);
perfDbClient.setConfigs(result.client_config, result.server_config);
perfDbClient_.setConfigs(result.client_config, result.server_config);
}
void PerfDbReporter::SendData() const {
//send data to performance database
int dataState = perfDbClient.sendData(access_token_, test_name_, sys_info_);
int dataState = perfDbClient_.sendData(access_token_, test_name_, sys_info_);
//check state of data sending
switch(dataState) {

@ -41,7 +41,7 @@
#include "test/cpp/qps/driver.h"
#include "test/cpp/qps/qpstest.grpc.pb.h"
#include "perf_db_client.h"
#include "test/cpp/qps/perf_db_client.h"
namespace grpc {
namespace testing {
@ -104,7 +104,7 @@ class GprLogReporter : public Reporter {
void ReportTimes(const ScenarioResult& result) const GRPC_OVERRIDE;
};
/** Reporter for client leaderboard. */
/** Reporter for performance database tool */
class PerfDbReporter : public Reporter {
public:
PerfDbReporter(const string& name, const string& access_token, const string& test_name, const string& sys_info, const string& server_address)
@ -114,7 +114,7 @@ class PerfDbReporter : public Reporter {
~PerfDbReporter() { SendData(); };
private:
PerfDbClient perfDbClient;
PerfDbClient perfDbClient_;
std::string access_token_;
std::string test_name_;
std::string sys_info_;

Loading…
Cancel
Save