mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
Return unused point slice to pool in Call and VectorSelector eval. (#6427)
Signed-off-by: Mark Nevill <mark.nevill@gmail.com>
This commit is contained in:
parent
c0250cf120
commit
b0a5c51b95
|
@ -1070,6 +1070,8 @@ func (ev *evaluator) eval(expr Expr) Value {
|
||||||
} else {
|
} else {
|
||||||
ev.error(ErrTooManySamples(env))
|
ev.error(ErrTooManySamples(env))
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
putPointSlice(ss.Points)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if mat.ContainsSameLabelset() {
|
if mat.ContainsSameLabelset() {
|
||||||
|
@ -1165,6 +1167,8 @@ func (ev *evaluator) eval(expr Expr) Value {
|
||||||
|
|
||||||
if len(ss.Points) > 0 {
|
if len(ss.Points) > 0 {
|
||||||
mat = append(mat, ss)
|
mat = append(mat, ss)
|
||||||
|
} else {
|
||||||
|
putPointSlice(ss.Points)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue