MCPcopy Create free account
hub / github.com/cortexproject/cortex / Next

Method Next

pkg/querier/batch/batch.go:139–149  ·  view source on GitHub ↗

Next implements chunkenc.Iterator.

()

Source from the content-addressed store, hash-verified

137
138// Next implements chunkenc.Iterator.
139func (a *iteratorAdapter) Next() chunkenc.ValueType {
140 a.curr.Index++
141 for a.curr.Index >= a.curr.Length && a.underlying.Next(a.batchSize) != chunkenc.ValNone {
142 a.curr = a.underlying.Batch()
143 a.batchSize = min(a.batchSize*2, chunk.BatchSize)
144 }
145 if a.curr.Index < a.curr.Length {
146 return a.curr.ValType
147 }
148 return chunkenc.ValNone
149}
150
151// At implements chunkenc.Iterator.
152func (a *iteratorAdapter) At() (int64, float64) {

Callers 1

SeekMethod · 0.95

Calls 2

NextMethod · 0.65
BatchMethod · 0.65

Tested by

no test coverage detected