Phase 7.2: Benchmark suite — profile-off / on-inactive / on-active - #22
Merged
Merged
Conversation
- benches/profile_bench.rs: three groups (small_allocs 32B, medium_allocs 4K, mixed 16..16384) x three variants (profile-off, profile-on-inactive at usize::MAX rate, profile-on-active at 512 KiB default rate). Hand-rolled main emits a stderr summary pointing at the ratio_idle metric used by CI to gate idle overhead at <= 5%. - Cargo.toml: criterion 0.5 (no default features) as a dev-dep, [[bench]] entry with harness = false. - benches/README.md: short doc on running, what ratio_idle means, why absolute numbers are host-specific.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Criterion-based benchmark suite to measure SNMALLOC_PROFILE=ON overhead.
small_allocs(32B),medium_allocs(4KB),mixed(random 16..16384)set_sampling_rate(usize::MAX)), profile-on-active (default 524288)criterion = { version = "0.5", default-features = false }(no HTML report — JSON estimates only, keeps dep weight down)main()— final stderr summary points totarget/criterion/**/estimates.jsonand printsratio_idle = mean(profile-on-inactive) / mean(profile-off)(the metric CI is expected to gate on)#[global_allocator]wired — sampling-rate FFI is process-global; we measure variant-to-variant relative overhead, not absolute throughput vs system mallocbenches/README.mdincluded with run instructionsTest plan
cargo build(no features)cargo test(no features) — full suite greencargo bench --no-run(no features + --features profiling) — compiles cleanNote: actual
cargo benchruns take minutes — deferred to reviewer / CI.