Skip to content
This repository was archived by the owner on Mar 26, 2019. It is now read-only.

Commit 607bcf0

Browse files
authored
Merge pull request #35 from bdrupieski/feature/0.5-quantile-median
change 0.5 quantile from mean to median
2 parents f650588 + eda809a commit 607bcf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/App.Metrics.Formatters.Prometheus/Internal/Extensions/MetricValueSourceExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static IEnumerable<Metric> ToPrometheusMetrics(this HistogramValueSource
105105
sample_sum = metric.Value.Sum,
106106
quantile =
107107
{
108-
new Quantile { quantile = 0.5, value = metric.Value.Mean },
108+
new Quantile { quantile = 0.5, value = metric.Value.Median },
109109
new Quantile { quantile = 0.75, value = metric.Value.Percentile75 },
110110
new Quantile { quantile = 0.95, value = metric.Value.Percentile95 },
111111
// new Quantile(){quantile = 0.98, value = metric.Value.Percentile98},
@@ -134,7 +134,7 @@ public static IEnumerable<Metric> ToPrometheusMetrics(this TimerValueSource metr
134134
sample_sum = rescaledVal.Histogram.Sum,
135135
quantile =
136136
{
137-
new Quantile { quantile = 0.5, value = rescaledVal.Histogram.Mean },
137+
new Quantile { quantile = 0.5, value = rescaledVal.Histogram.Median },
138138
new Quantile { quantile = 0.75, value = rescaledVal.Histogram.Percentile75 },
139139
new Quantile { quantile = 0.95, value = rescaledVal.Histogram.Percentile95 },
140140
// new Quantile(){quantile = 0.98, value = metric.Value.Histogram.Percentile98},

0 commit comments

Comments
 (0)