Add CodSpeed performance benchmarks for Rust domain layer#143
Merged
Conversation
5f8b30a to
a7fc863
Compare
Contributor
Author
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
- Add criterion benchmarks with codspeed-criterion-compat for the domain model - Cover URL parsing, download state machine, segment operations, checksum detection, link status, config operations, and priority creation - Add GitHub Actions workflow for continuous performance tracking - Add CodSpeed badge to README
Reorder criterion imports to match rustfmt 2024 edition rules. Previous CI fix (a7fc863) missed the bench target.
Required by the "CHANGELOG updated" CI job — code changes (benches, workflow, deps) need a matching [Unreleased] entry.
ea16c1a to
c3a7733
Compare
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.
What this PR does
Integrates CodSpeed continuous performance tracking into the Vortex project, benchmarking the Rust domain layer — the pure business logic at the core of the application.
Benchmarks added
22 benchmarks across 7 groups covering the critical domain model operations:
url_parsingdownload_state_machinesegment_operationschecksum_detectionlink_statusconfig_operationspriorityWhy the domain layer?
The domain layer (
src-tauri/src/domain/model/) implements core business logic with zero external dependencies — making it ideal for deterministic CPU simulation benchmarks. These operations are called on every download interaction, so regressions here directly impact user experience.Changes
src-tauri/benches/domain_benchmarks.rs— Criterion benchmark suite with CodSpeed compatibilitysrc-tauri/Cargo.toml— Addedcodspeed-criterion-compatdev dependency and bench target.github/workflows/codspeed.yml— GitHub Actions workflow for continuous performance tracking (simulation mode, OIDC auth)README.md— Added CodSpeed performance badgeHow it works
CodSpeed runs benchmarks in simulation mode, using CPU instruction counting for deterministic, reproducible measurements with <1% variance — no need for dedicated hardware. The GitHub Actions workflow runs on every push to
mainand on pull requests, providing automatic performance regression detection.Summary by cubic
Adds CodSpeed benchmarks for the Rust domain layer, with a CI workflow that runs on pushes and PRs to catch performance regressions. Adds a README badge and CHANGELOG entry; benches run from
src-tauri.New Features
src-tauri/benches/domain_benchmarks.rsusingcodspeed-criterion-compat.url_parsing,download_state_machine,segment_operations,checksum_detection,link_status,config_operations,priority.mainand PRs; builds and runs viacargo-codspeedfromsrc-tauri. Adds README badge and updates CHANGELOG.criterion(packagecodspeed-criterion-compat) and a bench target (domain_benchmarks) inCargo.toml.Bug Fixes
working-directoryand runs benches fromsrc-tauri, fixingcargo-codspeedexecution.Written for commit c3a7733. Summary will update on new commits.