Skip to content

Commit

Permalink
Removed redundant parameter from Reporter interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgquintas committed Jun 5, 2015
1 parent 6f61e95 commit c695066
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
10 changes: 4 additions & 6 deletions test/cpp/qps/report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ void CompositeReporter::ReportQPS(const ScenarioResult& result) const {
}
}

void CompositeReporter::ReportQPSPerCore(const ScenarioResult& result,
const ServerConfig& config) const {
void CompositeReporter::ReportQPSPerCore(const ScenarioResult& result) const {
for (size_t i = 0; i < reporters_.size(); ++i) {
reporters_[i]->ReportQPSPerCore(result, config);
reporters_[i]->ReportQPSPerCore(result);
}
}

Expand All @@ -76,15 +75,14 @@ void GprLogReporter::ReportQPS(const ScenarioResult& result) const {
[](ResourceUsage u) { return u.wall_time; }));
}

void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result,
const ServerConfig& server_config) const {
void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result) const {
auto qps =
result.latencies.Count() /
average(result.client_resources,
[](ResourceUsage u) { return u.wall_time; });

gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", qps,
qps / server_config.threads());
qps / result.server_config.threads());
}

void GprLogReporter::ReportLatency(const ScenarioResult& result) const {
Expand Down
9 changes: 3 additions & 6 deletions test/cpp/qps/report.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ class Reporter {
virtual void ReportQPS(const ScenarioResult& result) const = 0;

/** Reports QPS per core as (YYY/server core). */
virtual void ReportQPSPerCore(const ScenarioResult& result,
const ServerConfig& config) const = 0;
virtual void ReportQPSPerCore(const ScenarioResult& result) const = 0;

/** Reports latencies for the 50, 90, 95, 99 and 99.9 percentiles, in ms. */
virtual void ReportLatency(const ScenarioResult& result) const = 0;
Expand All @@ -84,8 +83,7 @@ class CompositeReporter : public Reporter {
void add(std::unique_ptr<Reporter> reporter);

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;

Expand All @@ -100,8 +98,7 @@ class GprLogReporter : public Reporter {

private:
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;
};
Expand Down

0 comments on commit c695066

Please sign in to comment.