mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Add comment
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
This commit is contained in:
parent
35f9620cd1
commit
0e1ae1d1ca
|
@ -2136,6 +2136,8 @@ loop:
|
||||||
if histograms == nil {
|
if histograms == nil {
|
||||||
histograms = getHPointSlice(16)
|
histograms = getHPointSlice(16)
|
||||||
}
|
}
|
||||||
|
// The last sample comes directly from the iterator, so we need to copy it to
|
||||||
|
// avoid having the same reference twice in the buffer.
|
||||||
point := HPoint{T: t, H: h.Copy()}
|
point := HPoint{T: t, H: h.Copy()}
|
||||||
histograms = append(histograms, point)
|
histograms = append(histograms, point)
|
||||||
ev.currentSamples += point.size()
|
ev.currentSamples += point.size()
|
||||||
|
|
Loading…
Reference in a new issue