Skip to content

Set up CodSpeed for continuous performance testing#1

Draft
codspeed-francois-dev[bot] wants to merge 1 commit intomasterfrom
setup-codspeed-1769443048084
Draft

Set up CodSpeed for continuous performance testing#1
codspeed-francois-dev[bot] wants to merge 1 commit intomasterfrom
setup-codspeed-1769443048084

Conversation

@codspeed-francois-dev
Copy link
Copy Markdown

Summary

This PR sets up CodSpeed for continuous performance testing of the anyhow error handling library. The repository already had benchmark infrastructure in place with divan, but this update modernizes the setup to use the latest CodSpeed versions and best practices.

Changes Made

  • Updated codspeed-divan-compat dependency from 4.2.1 to 4.3.0
  • Updated cargo-codspeed tool version from 4.2.1 to 4.3.0 in GitHub Actions workflow
  • Updated GitHub Actions checkout action from v6 to v4 (v6 doesn't exist)
  • Removed custom upload URL in favor of standard OIDC authentication
  • Verified all 3 benchmark suites (error_creation, error_context, error_downcast) work correctly with CodSpeed

Benchmark Coverage

The setup includes comprehensive benchmarks for:

  • Error creation patterns (anyhow macro, from string, with format, from io::Error)
  • Error context operations (static str, string, closures, multiple layers)
  • Error downcasting (by reference, by value, through context layers)
  • Error chain iteration and root cause access

Test Plan

  • Updated dependencies to latest versions
  • Built benchmarks with cargo codspeed build -m simulation
  • Ran benchmarks with cargo codspeed run (all 22 benchmarks passed)
  • Tested with codspeed CLI: codspeed run --mode simulation --skip-upload -- cargo codspeed run
  • Verified GitHub Actions workflow syntax
  • Monitor CI workflow execution after PR submission

Next Steps

After merging this PR:

  1. The CodSpeed workflow will run on every push to master and on pull requests
  2. Performance reports will be automatically posted on PRs showing the performance impact of changes
  3. The CodSpeed dashboard will track performance trends over time

The workflow uses OIDC authentication for secure, token-less communication with CodSpeed.

- Updated codspeed-divan-compat from 4.2.1 to 4.3.0
- Updated cargo-codspeed from 4.2.1 to 4.3.0
- Updated GitHub Actions workflow to use latest versions
- Removed custom upload URL (using standard OIDC auth)
- Fixed checkout action version to v4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants