From 771385789b3978932afeefcec204a32ba04a89e0 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Fri, 27 Apr 2018 10:53:16 -0700 Subject: [PATCH] Dont use benchmark counters --- test/cpp/microbenchmarks/helpers.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/cpp/microbenchmarks/helpers.cc b/test/cpp/microbenchmarks/helpers.cc index e4a31f50a97..e4ba37e2d6a 100644 --- a/test/cpp/microbenchmarks/helpers.cc +++ b/test/cpp/microbenchmarks/helpers.cc @@ -48,16 +48,10 @@ void TrackCounters::AddToLabel(std::ostream& out, benchmark::State& state) { static_cast(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(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(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();