mirror of
https://github.com/prometheus/prometheus
synced 2025-03-21 02:37:03 +00:00
Merge pull request #15849 from linasm/use-histogram-stats-decoder-for-histogram_avg
promql: use histogram stats decoder for histogram_avg
This commit is contained in:
commit
8846e42528
@ -3721,14 +3721,15 @@ func detectHistogramStatsDecoding(expr parser.Expr) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
continue
|
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
|
n.SkipHistogramBuckets = true
|
||||||
break
|
case "histogram_quantile", "histogram_fraction":
|
||||||
}
|
|
||||||
if call.Func.Name == "histogram_quantile" || call.Func.Name == "histogram_fraction" {
|
|
||||||
n.SkipHistogramBuckets = false
|
n.SkipHistogramBuckets = false
|
||||||
break
|
default:
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
return errors.New("stop")
|
return errors.New("stop")
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user