mirror of
https://github.com/prometheus/prometheus.git
synced 2026-02-03 20:39:32 -05:00
update ooo_head.go but only with TODOs
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
6647e512ad
commit
a5ac0bff1d
1 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue