Skip to content

Commit

Permalink
Merge pull request apache#2024 from Huixxi/avg-latency
Browse files Browse the repository at this point in the history
add avg latency for prometheus metrics
  • Loading branch information
cdjingit authored Feb 6, 2023
2 parents 02ec31d + 50f8717 commit d810d0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/brpc/builtin/prometheus_metrics_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ bool PrometheusMetricsDumper::DumpLatencyRecorderSuffix(
<< si->latency_percentiles[4] << '\n'
<< si->metric_name << "{quantile=\"1\"} "
<< si->latency_percentiles[5] << '\n'
<< si->metric_name << "{quantile=\"avg\"} "
<< si->latency_avg << '\n'
<< si->metric_name << "_sum "
// There is no sum of latency in bvar output, just use
// average * count as approximation
Expand Down

0 comments on commit d810d0c

Please sign in to comment.