Expand description
Statistics: streaming (Welford) and batch algorithms.
Modules§
- chart_
overlay 🔒 - Single-call computation of all chart statistical overlays for one WASM boundary crossing.
- simd
- SIMD-accelerated helpers for telemetry hot paths (WASM SIMD128 on
wasm32+simd128, autovectorized scalar elsewhere). - summary 🔒
- Statistics: streaming (Welford) and batch algorithms.
- timeline_
layout 🔒 - Timeline layout helpers shared by time-vs-event UI (tick placement and lane packing).
Structs§
- Batch
- Batch statistics for a complete dataset.
- Chart
Overlay View - Pre-computed chart overlay data returned across the WASM boundary.
- Linear
Regression - Scatter
Overlay View - Pre-computed scatter overlay (mean lines + regression segment); when
validis false the numeric fields are zeros. - Streaming
- Streaming mean/variance via Welford’s online algorithm (O(1) memory).
- Timeline
Geometry - Layout + viewport inputs for a timeline (pixels and milliseconds;
zoom/pan_msare clamped by the math). - Timeline
Metrics - Derived pixel/time geometry for one render of a timeline.
- Timeline
Viewport - A timeline viewport: the committed pan offset and zoom factor.
Constants§
- DEFAULT_
TARGET_ PIXELS_ PER_ TICK - Target pixel gap between adjacent ticks when no caller preference is set.
Functions§
- assign_
timeline_ lanes - Pack
(start, end)intervals into non-overlapping lanes via greedy scheduling, returning lanes in input order. - compute_
all_ percentiles_ from_ hdr - Compute all standard percentiles from an HDR histogram.
- compute_
bucket_ averages_ x10 - Compute per-bucket
dps_per_bucket_x10averages (sum/samples, 0 whensamples == 0). - compute_
chart_ overlay - Compute all chart overlay statistics in one call.
- compute_
result_ core - Compute
(mean_dps_x10, std_dps_x10, ci95_half_pct_x10000)forResultCoreV1. - compute_
scatter_ overlay - Compute scatter overlay statistics from paired (x, y) values; non-finite pairs are dropped,
valid: falseif too few pairs remain or xs are identical. - compute_
timeline_ metrics - Derive all pixel/time geometry (including axis ticks) for one timeline render; the source of truth for px<->ms.
- compute_
timeline_ ticks - Pick “nice” tick positions (ms) inside
[0, duration_ms]for a timeline axis. - correlation
- Compute Pearson correlation coefficient.
- covariance
- Compute sample covariance between two slices.
- ema
- Exponential moving average with smoothing factor alpha (0-1).
- ema_
span - EMA with span-based smoothing: alpha = 2 / (span + 1).
- histogram_
percentile_ from_ hdr - Compute a percentile (
pin 0.0..=1.0) from an HDR histogram, in x10 space. - linear_
regression - Compute simple linear regression using least squares.
- merge_
dps_ stats - Merge chunk DPS stats into the running aggregate via Chan/Golub/LeVeque pairwise merge.
- pan_
timeline_ by - Compute the new viewport after dragging the track by
delta_pxpixels (zoom unchanged). - sma
- Simple moving average with window size.
- zoom_
timeline_ at - Compute the new viewport after a cursor-anchored zoom step (
local_xpixels from the track left, cursor time fixed).