Skip to main content

Module chunkenc

Module chunkenc 

Source
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.go and histogram_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§

DecodeOutcome
How many samples a chunk produced, split by kind.
FloatHistogramSample
One decoded float native histogram sample.
IntHistogramSample
One decoded integer native histogram sample.
Span
One run of consecutive populated buckets in a native histogram.

Enums§

CounterResetHint
Counter-reset hint for one histogram sample.
HistogramKind
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§

SampleSink
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.