perf(bench): add hot-path harness — baseline relay, reassembly, and derived-state costs#60
Merged
Merged
Conversation
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.
Description
Adds a first SOF-owned Criterion benchmark harness for public hot paths and records a validated VPS baseline for future performance work.
This matters because the repo already has strong architectural guidance around hot-path changes, but it did not yet have a repeatable SOF-side benchmark entry point for relay/cache, dataset reassembly, or derived-state dispatch. This PR makes performance work more reviewable and gives future optimizations a concrete baseline to compare against.
Changes
crates/sof-observer/benches/hot_paths.rsallowescapes.crates/sof-observer/Cargo.tomlcriterionas a dev-dependency.hot_pathsbench target.CONTRIBUTING.mddocs/architecture/ard/0006-performance-and-hot-path-playbook.mdAffected slices:
relayreassemblyframework::derived_stateCross-slice communication changes:
Migration requirements:
Motivation
Business motivation:
Technical motivation:
Alternative approaches considered:
Scope and impact
relay,reassembly,framework::derived_state, contributor/performance docsTesting
Commands/results:
Manual / VPS verification:
91.99.102.201).VPS baseline results:
relay_cache_insert/shared_cache_insert_512[287.33 us 289.35 us 291.96 us][1.7536 Melem/s 1.7695 Melem/s 1.7819 Melem/s]relay_cache_query/shared_cache_query_range_64[611.80 ns 1.2489 us 2.2808 us][28.060 Melem/s 51.243 Melem/s 104.61 Melem/s]dataset_reassembly/contiguous_slot_32[3.4682 us 3.4790 us 3.4880 us][9.1742 Melem/s 9.1980 Melem/s 9.2266 Melem/s]derived_state_dispatch/slot_status_batch_64[64.297 us 66.909 us 69.193 us][924.95 Kelem/s 956.52 Kelem/s 995.38 Kelem/s]Key takeaway:
Related issues and documentation
feat/soak-fault-hardeningandfeat/busy-poll-experimentsdocs/architecture/README.mddocs/architecture/ard/0006-performance-and-hot-path-playbook.mddocs/architecture/adr/0004-static-dispatch-and-performance-layout.mdReviewer checklist
docs/architecture/ard/0003-slice-dependency-contracts.md)Additional notes