Add comment

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
This commit is contained in:
Filip Petkovski 2023-12-25 11:41:07 +01:00
parent 35f9620cd1
commit 0e1ae1d1ca
No known key found for this signature in database
GPG key ID: 431B0F2E85E42402

View file

@ -2136,6 +2136,8 @@ loop:
if histograms == nil {
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()}
histograms = append(histograms, point)
ev.currentSamples += point.size()