mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
promql: use histogram stats decoder for histogram_avg
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
This commit is contained in:
parent
2a8ae586f4
commit
940016e002
|
@ -3721,14 +3721,15 @@ func detectHistogramStatsDecoding(expr parser.Expr) {
|
|||
if !ok {
|
||||
continue
|
||||
}
|
||||
if call.Func.Name == "histogram_count" || call.Func.Name == "histogram_sum" {
|
||||
switch call.Func.Name {
|
||||
case "histogram_count", "histogram_sum", "histogram_avg":
|
||||
n.SkipHistogramBuckets = true
|
||||
break
|
||||
}
|
||||
if call.Func.Name == "histogram_quantile" || call.Func.Name == "histogram_fraction" {
|
||||
case "histogram_quantile", "histogram_fraction":
|
||||
n.SkipHistogramBuckets = false
|
||||
break
|
||||
default:
|
||||
continue
|
||||
}
|
||||
break
|
||||
}
|
||||
return errors.New("stop")
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue