Browse Source

PromQL: reduce garbage in range-query evaluation

The temporary variable was allocated on the heap, and it is unnecessary.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
pull/13043/head
Bryan Boreham 1 year ago
parent
commit
49c5e7afe1
  1. 4
      promql/engine.go

4
promql/engine.go

@ -1172,9 +1172,7 @@ func (ev *evaluator) rangeEval(prepSeries func(labels.Labels, *EvalSeriesHelper)
bufHelpers[i] = make([]EvalSeriesHelper, len(matrixes[i]))
for si, series := range matrixes[i] {
h := seriesHelpers[i][si]
prepSeries(series.Metric, &h)
seriesHelpers[i][si] = h
prepSeries(series.Metric, &seriesHelpers[i][si])
}
}
}

Loading…
Cancel
Save