Merge pull request #15220 from ncteisen/microbenchmarks

Don't Use Benchmark Counters
pull/12775/head
Noah Eisen 7 years ago committed by GitHub
commit b649422741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      test/cpp/microbenchmarks/helpers.cc
  2. 9
      tools/profiling/microbenchmarks/bm_diff/bm_constants.py

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

@ -22,11 +22,10 @@ _AVAILABLE_BENCHMARK_TESTS = [
'bm_metadata', 'bm_fullstack_trickle' 'bm_metadata', 'bm_fullstack_trickle'
] ]
_INTERESTING = ('cpu_time', 'real_time', 'call_initial_size-median', _INTERESTING = ('cpu_time', 'real_time', 'locks_per_iteration',
'locks_per_iteration', 'allocs_per_iteration', 'allocs_per_iteration', 'writes_per_iteration',
'writes_per_iteration', 'atm_cas_per_iteration', 'atm_cas_per_iteration', 'atm_add_per_iteration',
'atm_add_per_iteration', 'nows_per_iteration', 'nows_per_iteration', 'cli_transport_stalls_per_iteration',
'cli_transport_stalls_per_iteration',
'cli_stream_stalls_per_iteration', 'cli_stream_stalls_per_iteration',
'svr_transport_stalls_per_iteration', 'svr_transport_stalls_per_iteration',
'svr_stream_stalls_per_iteration', 'svr_stream_stalls_per_iteration',

Loading…
Cancel
Save