Add CodSpeed performance benchmarks#20
Conversation
Set up continuous performance measurement for the sfos-sdk crate using criterion with the CodSpeed compatibility layer. Benchmarks cover parsing, IR bridging, zone graph build/render, reachability analysis, and shadowed rule detection. Adds a GitHub Actions workflow to run them in CI and a CodSpeed badge to the README. Signed-off-by: CodSpeed Bot <no-reply@codspeed.io>
CodSpeed setup failedThe benchmarks, CI workflow (.github/workflows/codspeed.yml, simulation mode, OIDC), README badge, and PR (#20) were all set up correctly and the benchmarks were verified locally. However, the codspeed workflow cannot run in CI: it ends in |
Summary
This PR sets up continuous performance measurement for
sfos-rswith CodSpeed. It adds a criterion-based benchmark suite for thesfos-sdkcrate, wires it into CI through a dedicated GitHub Actions workflow, and adds a CodSpeed status badge to the README.Changes
crates/sfos-sdk/Cargo.toml— addedcodspeed-criterion-compatas a dev-dependency (aliased tocriterion, so the benchmarks read as standard criterion code) and registered thesdkbenchmark target withharness = false.crates/sfos-sdk/benches/sdk.rs— a new benchmark suite covering the core offline analysis pipeline:parse_entitieson three representativeEntities.xmlfixtures (sample, NAT, VPN)to_model— Sophos config to vendor-neutral IR bridgegraph::build,to_dot, andto_mermaid— zone graph construction and renderingexplainandforward— reachability / packet-forwarding analysis, including DNAT follow-throughshadow::detect— shadowed / dead rule detection across all rule sets.github/workflows/codspeed.yml— a new workflow that builds the benchmarks withcargo codspeed buildand runs them via the CodSpeed action insimulationmode. It uses OpenID Connect authentication (id-token: write) and pins actions by commit hash to match the repository's existing convention.README.md— added the CodSpeed badge alongside the existing status badges.Cargo.lock— updated for the new dev-dependency.The benchmarks were verified locally in simulation mode before opening this PR; all 10 benchmarks build and run successfully.
Notes
ubuntu-latest, no special runners required.Next steps
main.