subms-stats
Latency-distribution statistics. Pure functions on &[u64] sample
arrays plus an ergonomic SubMsSamples facade.
This is the statistics primitive the subms perf harness uses
internally, published as its own crate so you can use it without
pulling in the bench machinery. Bring your own Vec<u64> of
nanosecond readings (from any source) and compose the analyses you
need.
Modules / Cargo features
| Feature | Module | What |
|---|---|---|
| (always on) | percentiles |
percentile, percentile_sweep, mean, stddev |
histogram |
histogram |
64-bucket log2 CDF for full-distribution export |
jitter |
jitter |
Per-window CV score - measurement-rig stability |
tail |
tail |
Conditional tail expectation, Hill estimator, p99/p50 fatness |
robust |
robust |
IQR, MAD, CoV, skewness, excess kurtosis |
compare |
compare |
KS statistic, Cohen's d effect size |
bootstrap |
bootstrap |
Reproducible bootstrap CIs for percentiles |
All features are on by default. For a minimal build:
= { = "0.5", = false }
For a focused subset:
= { = "0.5", = false, = ["histogram", "tail"] }
Quickstart
use SubMsSamples;
let raw: = vec!;
let s = new;
let p99 = s.p99;
let p99_to_p50_ratio = s.tail_fatness_ratio; // tail feature
let cdf = s.cdf_buckets; // histogram feature
let = s.bootstrap_percentile_ci; // bootstrap feature
License
Dual: MIT OR Apache-2.0.