mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-12 16:44:05 -08:00
promql: refactor: eliminate one 'else'
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
0ac927515b
commit
12961c6a37
|
@ -3081,12 +3081,12 @@ func addToSeries(ss *Series, ts int64, f float64, h *histogram.FloatHistogram, n
|
||||||
ss.Floats = getFPointSlice(numSteps)
|
ss.Floats = getFPointSlice(numSteps)
|
||||||
}
|
}
|
||||||
ss.Floats = append(ss.Floats, FPoint{T: ts, F: f})
|
ss.Floats = append(ss.Floats, FPoint{T: ts, F: f})
|
||||||
} else {
|
return
|
||||||
|
}
|
||||||
if ss.Histograms == nil {
|
if ss.Histograms == nil {
|
||||||
ss.Histograms = getHPointSlice(numSteps)
|
ss.Histograms = getHPointSlice(numSteps)
|
||||||
}
|
}
|
||||||
ss.Histograms = append(ss.Histograms, HPoint{T: ts, H: h})
|
ss.Histograms = append(ss.Histograms, HPoint{T: ts, H: h})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ev *evaluator) nextValues(ts int64, series *Series) (f float64, h *histogram.FloatHistogram, b bool) {
|
func (ev *evaluator) nextValues(ts int64, series *Series) (f float64, h *histogram.FloatHistogram, b bool) {
|
||||||
|
|
Loading…
Reference in a new issue