Complete reporting for failure rates

reviewable/pr8239/r2
Craig Tiller 8 years ago
parent 9c7f4f7028
commit 0895545a58
  1. 4
      src/proto/grpc/testing/control.proto
  2. 2
      test/cpp/qps/client.h
  3. 7
      test/cpp/qps/driver.cc
  4. 5
      test/cpp/qps/qps_json_driver.cc
  5. 6
      test/cpp/qps/report.cc

@ -220,8 +220,8 @@ message ScenarioResultSummary
double latency_999 = 11;
// Number of requests that succeeded/failed
int64 successful_requests = 12;
int64 failed_requests = 13;
double successful_requests_per_second = 12;
double failed_requests_per_second = 13;
}
// Results of a single benchmark scenario.

@ -321,7 +321,7 @@ class Client {
histogram_.Add(entry.value());
}
if (entry.status_used()) {
statuses_[entry.value()]++;
statuses_[entry.status()]++;
}
if (!thread_still_ok) {
gpr_log(GPR_ERROR, "Finishing client thread due to RPC error");

@ -132,7 +132,8 @@ static void postprocess_scenario_result(ScenarioResult* result) {
Histogram histogram;
histogram.MergeProto(result->latencies());
auto qps = histogram.Count() / average(result->client_stats(), WallTime);
auto time_estimate = average(result->client_stats(), WallTime);
auto qps = histogram.Count() / time_estimate;
auto qps_per_server_core = qps / sum(result->server_cores(), Cores);
result->mutable_summary()->set_qps(qps);
@ -169,8 +170,8 @@ static void postprocess_scenario_result(ScenarioResult* result) {
failures += rrc.count();
}
}
result->mutable_summary()->set_successful_requests(successes);
result->mutable_summary()->set_failed_requests(successes);
result->mutable_summary()->set_successful_requests_per_second(successes / time_estimate);
result->mutable_summary()->set_failed_requests_per_second(failures / time_estimate);
}
}

@ -110,11 +110,6 @@ static bool QpsDriver() {
GetReporter()->ReportLatency(*result);
GetReporter()->ReportTimes(*result);
if (result->mutable_summary()->failed_requests()) {
std::cerr << "# failed requests: "
<< result->mutable_summary()->failed_requests() << "\n";
}
for (int i = 0; success && i < result->client_success_size(); i++) {
success = result->client_success(i);
}

@ -73,6 +73,12 @@ void CompositeReporter::ReportTimes(const ScenarioResult& result) {
void GprLogReporter::ReportQPS(const ScenarioResult& result) {
gpr_log(GPR_INFO, "QPS: %.1f", result.summary().qps());
if (result.summary().failed_requests_per_second() > 0) {
gpr_log(GPR_INFO, "failed requests/second: %.1f",
result.summary().failed_requests_per_second());
gpr_log(GPR_INFO, "successful requests/second: %.1f",
result.summary().successful_requests_per_second());
}
}
void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result) {

Loading…
Cancel
Save