Expand description
LTTB Downsampling for Metrics - Efficient bandwidth reduction with visual fidelity
This module implements MinMax LTTB (Largest Triangle Three Buckets) downsampling:
- Collect metrics at full float precision (no rounding)
- Apply MinMax LTTB to reduce point count while preserving visual shape
- Encode as MessagePack with metadata and checksum
MinMax LTTB preserves local minima/maxima and is computationally efficient, making it ideal for monitoring dashboards where peaks and valleys matter.
Structs§
- Downsampled
Metrics - DownsampledMetrics: MessagePack container with LTTB-downsampled points
- Metadata
- Metric
Point - A downsampled metric point
- Metrics
Snapshot - A 5-minute metrics snapshot containing all metrics for a window
- Snapshot
Data - Snapshot data containing all metric time series
- Time
Range
Functions§
- encode_
downsampled - Encode metrics with LTTB downsampling
- encode_
snapshot - Encode metrics as a 5-minute snapshot with LTTB downsampling per metric