Expand description
Chunk encoding dispatch and shared sample types.
Re-exports§
pub use decode_limits::DecodeLimits;
Modules§
- bstream
- Bit stream reader compatible with Prometheus’
chunkenc.bstreamReader. - decode_
limits - Bounded decoding of chunk payloads.
- histogram
- Histogram / float histogram decoders, ported from
tsdb/chunkenc/histogram.go,float_histogram.goandhistogram_meta.go. - varbit
- Prometheus varbit integer encodings (
chunkenc/varbit.go). - xor
- XOR chunk decoder, ported from
tsdb/chunkenc/xor.go. - xor2
- XOR2 chunk decoder, ported from
tsdb/chunkenc/xor2.go.
Structs§
- Decode
Outcome - How many samples a chunk produced, split by kind.
- Float
Histogram Sample - One decoded float native histogram sample.
- IntHistogram
Sample - One decoded integer native histogram sample.
- Span
- One run of consecutive populated buckets in a native histogram.
Enums§
- Counter
Reset Hint - Counter-reset hint for one histogram sample.
- Histogram
Kind - Which on-disk representation produced a histogram sample.
Constants§
- ENC_
FLOAT_ HISTOGRAM - Float native histogram, without a start timestamp.
- ENC_
FLOAT_ HISTOGRAM_ ST - Float native histogram carrying a start timestamp.
- ENC_
HISTOGRAM - Integer native histogram, without a start timestamp.
- ENC_
HISTOGRAM_ ST - Integer native histogram carrying a start timestamp.
- ENC_
NONE - Not a real chunk: an empty placeholder.
- ENC_XOR
- Gorilla-style XOR encoding for float samples (index v1 era).
- ENC_
XOR2 - XOR encoding with improved timestamp compression (index v2+).
- STALE_
NAN_ BITS math.Float64frombits(value.StaleNaN)used by Prometheus.
Traits§
- Sample
Sink - Receives decoded samples in time order.
Functions§
- decode
- Decodes a chunk body (encoding byte already stripped).
- decode_
with_ limits - Decodes a chunk body with explicit limits.
- encoding_
histogram_ kind - Which histogram kind an encoding byte carries, if it is a histogram.
- encoding_
name - Human-readable name of an encoding byte, for logs and error messages.
- is_
known_ encoding - True when this crate can decode the encoding byte.