Skip to main content

Module stats

Module stats 

Source
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.
ChartOverlayView
Pre-computed chart overlay data returned across the WASM boundary.
LinearRegression
ScatterOverlayView
Pre-computed scatter overlay (mean lines + regression segment); when valid is false the numeric fields are zeros.
Streaming
Streaming mean/variance via Welford’s online algorithm (O(1) memory).
TimelineGeometry
Layout + viewport inputs for a timeline (pixels and milliseconds; zoom/pan_ms are clamped by the math).
TimelineMetrics
Derived pixel/time geometry for one render of a timeline.
TimelineViewport
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_x10 averages (sum/samples, 0 when samples == 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) for ResultCoreV1.
compute_scatter_overlay
Compute scatter overlay statistics from paired (x, y) values; non-finite pairs are dropped, valid: false if 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 (p in 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_px pixels (zoom unchanged).
sma
Simple moving average with window size.
zoom_timeline_at
Compute the new viewport after a cursor-anchored zoom step (local_x pixels from the track left, cursor time fixed).

Type Aliases§

Summary
Alias for Batch.