mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Add comment on SampleRingIterator
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
This commit is contained in:
parent
48df9fc020
commit
bb8363dbb3
|
@ -2114,12 +2114,7 @@ loop:
|
|||
if floats == nil {
|
||||
floats = getFPointSlice(16)
|
||||
}
|
||||
if n := len(floats); n < cap(floats) {
|
||||
floats = floats[:n+1]
|
||||
floats[n].T, floats[n].F = t, f
|
||||
} else {
|
||||
floats = append(floats, FPoint{T: t, F: f})
|
||||
}
|
||||
floats = append(floats, FPoint{T: t, F: f})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -310,6 +310,8 @@ func (r *sampleRing) iterator() *SampleRingIterator {
|
|||
return &r.it
|
||||
}
|
||||
|
||||
// SampleRingIterator is returned by BufferedSeriesIterator.Buffer() and can be
|
||||
// used to iterate samples buffered in the lookback window.
|
||||
type SampleRingIterator struct {
|
||||
r *sampleRing
|
||||
i int
|
||||
|
@ -358,14 +360,6 @@ func (it *SampleRingIterator) Next() chunkenc.ValueType {
|
|||
}
|
||||
}
|
||||
|
||||
func (it *SampleRingIterator) Seek(int64) chunkenc.ValueType {
|
||||
return chunkenc.ValNone
|
||||
}
|
||||
|
||||
func (it *SampleRingIterator) Err() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (it *SampleRingIterator) At() (int64, float64) {
|
||||
return it.t, it.f
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue