|
|
@ -38,6 +38,7 @@ void TrackCounters::AddLabel(const grpc::string& label) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void TrackCounters::AddToLabel(std::ostream& out, benchmark::State& state) { |
|
|
|
void TrackCounters::AddToLabel(std::ostream& out, benchmark::State& state) { |
|
|
|
|
|
|
|
#ifdef GRPC_COLLECT_STATS |
|
|
|
grpc_stats_data stats_end; |
|
|
|
grpc_stats_data stats_end; |
|
|
|
grpc_stats_collect(&stats_end); |
|
|
|
grpc_stats_collect(&stats_end); |
|
|
|
grpc_stats_data stats; |
|
|
|
grpc_stats_data stats; |
|
|
@ -53,6 +54,7 @@ void TrackCounters::AddToLabel(std::ostream& out, benchmark::State& state) { |
|
|
|
<< " " << grpc_stats_histogram_name[i] << "-99p:" |
|
|
|
<< " " << grpc_stats_histogram_name[i] << "-99p:" |
|
|
|
<< grpc_stats_histo_percentile(&stats, (grpc_stats_histograms)i, 99.0); |
|
|
|
<< grpc_stats_histo_percentile(&stats, (grpc_stats_histograms)i, 99.0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
#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(); |
|
|
|
out << " locks/iter:" |
|
|
|
out << " locks/iter:" |
|
|
|