pub struct SeriesRef {
pub id: u64,
pub offset: u64,
pub labels: Vec<(Arc<str>, Arc<str>)>,
pub chunks: Vec<ChunkMeta>,
}Expand description
One series: its label set and the chunks that hold its samples.
Despite the name this is an owned record, not a reference into the file:
label strings are resolved through the symbol table once, then shared as
Arc<str> so a caller can keep them after the iterator moves on.
Fields§
§id: u64Reference as stored in the index (v2/v3: byte offset / 16). This is the same value tombstones use to identify a series.
offset: u64Byte offset of the series record in the index file.
labels: Vec<(Arc<str>, Arc<str>)>Labels in lexicographic order, exactly as stored in the index.
chunks: Vec<ChunkMeta>Chunks in ascending time order.
Implementations§
Source§impl SeriesRef
impl SeriesRef
Sourcepub fn chunks_in_range(
&self,
range: TimeRange,
) -> impl Iterator<Item = &ChunkMeta> + '_
pub fn chunks_in_range( &self, range: TimeRange, ) -> impl Iterator<Item = &ChunkMeta> + '_
The series’ chunks that can hold samples in range, in time order.
Chunks outside the range are not returned, so a caller never decodes data it cannot use. Samples inside a returned chunk still need the per-sample range filter, because a chunk can straddle the boundaries.