diff options
author | Noah Eisen <ncteisen@gmail.com> | 2018-04-27 13:38:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-27 13:38:01 -0700 |
commit | b649422741a32cd97740fed1035a0e5c317a6dd7 (patch) | |
tree | 04aaf02ae63a87c2463618825ae4bc4e9b805232 | |
parent | 90cb93abfc9ab304887964b138ecdafd070e7a17 (diff) | |
parent | 99e910f58fa54e9bce2518c6f9752ba1e8dbd6af (diff) |
Merge pull request #15220 from ncteisen/microbenchmarks
Don't Use Benchmark Counters
-rw-r--r-- | test/cpp/microbenchmarks/helpers.cc | 14 | ||||
-rw-r--r-- | tools/profiling/microbenchmarks/bm_diff/bm_constants.py | 9 |
2 files changed, 8 insertions, 15 deletions
diff --git a/test/cpp/microbenchmarks/helpers.cc b/test/cpp/microbenchmarks/helpers.cc index e4a31f50a9..e4ba37e2d6 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<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(); diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_constants.py b/tools/profiling/microbenchmarks/bm_diff/bm_constants.py index 5719e42620..c8b6c1ebd0 100644 --- a/tools/profiling/microbenchmarks/bm_diff/bm_constants.py +++ b/tools/profiling/microbenchmarks/bm_diff/bm_constants.py @@ -22,11 +22,10 @@ _AVAILABLE_BENCHMARK_TESTS = [ 'bm_metadata', 'bm_fullstack_trickle' ] -_INTERESTING = ('cpu_time', 'real_time', 'call_initial_size-median', - 'locks_per_iteration', 'allocs_per_iteration', - 'writes_per_iteration', 'atm_cas_per_iteration', - 'atm_add_per_iteration', 'nows_per_iteration', - 'cli_transport_stalls_per_iteration', +_INTERESTING = ('cpu_time', 'real_time', 'locks_per_iteration', + 'allocs_per_iteration', 'writes_per_iteration', + 'atm_cas_per_iteration', 'atm_add_per_iteration', + 'nows_per_iteration', 'cli_transport_stalls_per_iteration', 'cli_stream_stalls_per_iteration', 'svr_transport_stalls_per_iteration', 'svr_stream_stalls_per_iteration', |