Dont use benchmark counters

pull/15220/head
ncteisen 7 years ago
parent f001d67d4e
commit 771385789b
  1. 14
      test/cpp/microbenchmarks/helpers.cc

@ -48,16 +48,10 @@ void TrackCounters::AddToLabel(std::ostream& out, benchmark::State& state) {
static_cast<double>(state.iterations()));
}
for (int i = 0; i < GRPC_STATS_HISTOGRAM_COUNT; i++) {
std::ostringstream median_ss;
median_ss << grpc_stats_histogram_name[i] << "-median";
state.counters[median_ss.str()] =
benchmark::Counter(grpc_stats_histo_percentile(
&stats, static_cast<grpc_stats_histograms>(i), 50.0));
std::ostringstream tail_ss;
tail_ss << grpc_stats_histogram_name[i] << "-99p";
state.counters[tail_ss.str()] =
benchmark::Counter(grpc_stats_histo_percentile(
&stats, static_cast<grpc_stats_histograms>(i), 99.0));
out << " " << grpc_stats_histogram_name[i] << "-median:"
<< grpc_stats_histo_percentile(&stats, (grpc_stats_histograms)i, 50.0)
<< " " << grpc_stats_histogram_name[i] << "-99p:"
<< grpc_stats_histo_percentile(&stats, (grpc_stats_histograms)i, 99.0);
}
#ifdef GPR_LOW_LEVEL_COUNTERS
grpc_memory_counters counters_at_end = grpc_memory_counters_snapshot();

Loading…
Cancel
Save