mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
app/vmselect/promql: re-use metrics.Histogram when calculating histogram function for each point on the graph
This should reduce the amounts memory allocations
This commit is contained in:
parent
da98703748
commit
0401969d78
1 changed files with 2 additions and 1 deletions
|
@ -187,9 +187,10 @@ func aggrFuncGeomean(tss []*timeseries) []*timeseries {
|
|||
}
|
||||
|
||||
func aggrFuncHistogram(tss []*timeseries) []*timeseries {
|
||||
var h metrics.Histogram
|
||||
m := make(map[string]*timeseries)
|
||||
for i := range tss[0].Values {
|
||||
var h metrics.Histogram
|
||||
h.Reset()
|
||||
for _, ts := range tss {
|
||||
v := ts.Values[i]
|
||||
h.Update(v)
|
||||
|
|
Loading…
Reference in a new issue