You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2025/02/26 13:42:39 UTC
(couchdb) 01/01: fix arithmetic mean in _prometheus
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch mean-ol-prometheus
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit d379238843d9f15e9bdcc3906564cd62c26a352d
Author: Robert Newson <rn...@apache.org>
AuthorDate: Wed Feb 26 13:42:14 2025 +0000
fix arithmetic mean in _prometheus
---
src/couch_prometheus/src/couch_prometheus_util.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/couch_prometheus/src/couch_prometheus_util.erl b/src/couch_prometheus/src/couch_prometheus_util.erl
index 3cfc0994f..2ae927656 100644
--- a/src/couch_prometheus/src/couch_prometheus_util.erl
+++ b/src/couch_prometheus/src/couch_prometheus_util.erl
@@ -173,7 +173,7 @@ to_prom_summary(Path, Info) ->
Percentiles
),
SumMetric = path_to_name(Path ++ ["seconds", "sum"]),
- SumStat = to_prom(SumMetric, Count * Mean),
+ SumStat = to_prom(SumMetric, (Count * Mean) / 1000),
CountMetric = path_to_name(Path ++ ["seconds", "count"]),
CountStat = to_prom(CountMetric, Count),
to_prom(Metric, summary, desc(Info), Quantiles) ++ [SumStat, CountStat].