subms (Rust)
The Rust side of the subms perf harness. Zero-dependency std-only crate. Records timed samples per stage, computes percentiles, supports coordinated-omission correction, runs scale sweeps, and emits a JSON contract byte-equivalent to the Java side.
See the repo-root README for the cross-language overview, JSON-contract spec, and ecosystem links.
Install
[]
= "0.3"
Quickstart
use ;
let mut h = new;
h.input;
let put = h.stage;
for _ in 0..50_000
let summary = summarize;
print_summary?;
assert_p99_under?;
Feature flags
| flag | what it enables |
|---|---|
| (default) | The harness, summary, sweep, diff, timer, paced stage, JSON emission. Pure std-lib. |
No optional features today. The crate stays small and dependency-free on purpose.
Public API surface
| type / fn | does |
|---|---|
SubMsPerfHarness |
records timed samples per named stage |
SubMsStage / SubMsPacedStage |
per-stage recorder (paced = coordinated-omission corrected) |
summarize(&h) / summarize_lean(&h) |
sorted percentiles + downsampled timeline |
print_summary(&s, &mut writer) |
fixed-width percentile table |
summary_to_json(&s, &mut writer) |
the stable JSON shape |
run_sweep(&recipe, &[params...], varied_key) |
multi-run scale curve / feature toggle |
diff_summary(&base, &cand) |
typed per-stage regression delta |
assert_p99_under(&target, &[...]) |
the cookbook quality gate |
SubMsTimer |
autostart stopwatch with named checkpoints |
SubMsRecipe trait |
implement for cookbook-style standardised benches |
Full reference at docs.rs/subms.
License
Dual-licensed under MIT or Apache-2.0 at your option.