update ooo_head.go but only with TODOs

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
György Krajcsovits 2026-01-14 10:02:13 +01:00
parent 6647e512ad
commit a5ac0bff1d
No known key found for this signature in database
GPG key ID: 47A8F9CE80FD7C7F

View file

@ -40,7 +40,8 @@ func (o *OOOChunk) Insert(t int64, v float64, h *histogram.Histogram, fh *histog
// try to append at the end first if the new timestamp is higher than the
// last known timestamp.
if len(o.samples) == 0 || t > o.samples[len(o.samples)-1].t {
o.samples = append(o.samples, sample{t, v, h, fh})
// TODO(krajorama): pass ST.
o.samples = append(o.samples, sample{0, t, v, h, fh})
return true
}
@ -49,7 +50,8 @@ func (o *OOOChunk) Insert(t int64, v float64, h *histogram.Histogram, fh *histog
if i >= len(o.samples) {
// none found. append it at the end
o.samples = append(o.samples, sample{t, v, h, fh})
// TODO(krajorama): pass ST.
o.samples = append(o.samples, sample{0, t, v, h, fh})
return true
}
@ -61,7 +63,8 @@ func (o *OOOChunk) Insert(t int64, v float64, h *histogram.Histogram, fh *histog
// Expand length by 1 to make room. use a zero sample, we will overwrite it anyway.
o.samples = append(o.samples, sample{})
copy(o.samples[i+1:], o.samples[i:])
o.samples[i] = sample{t, v, h, fh}
// TODO(krajorama): pass ST.
o.samples[i] = sample{0, t, v, h, fh}
return true
}