NewBufferIterator returns a new iterator that buffers the values within the time range of the current element and the duration of delta before.
(it chunkenc.Iterator, delta int64)
| 45 | // NewBufferIterator returns a new iterator that buffers the values within the |
| 46 | // time range of the current element and the duration of delta before. |
| 47 | func NewBufferIterator(it chunkenc.Iterator, delta int64) *BufferedSeriesIterator { |
| 48 | bit := &BufferedSeriesIterator{ |
| 49 | buf: newSampleRing(delta, 0, chunkenc.ValNone), |
| 50 | delta: delta, |
| 51 | } |
| 52 | bit.Reset(it) |
| 53 | |
| 54 | return bit |
| 55 | } |
| 56 | |
| 57 | // Reset re-uses the buffer with a new iterator, resetting the buffered time |
| 58 | // delta to its original value. |
searching dependent graphs…