Skip to content

Conversation

@codspeed-hq
Copy link
Contributor

@codspeed-hq codspeed-hq bot commented Jan 23, 2026

Summary

This PR integrates CodSpeed continuous performance testing into the python-cqrs project to enable automated performance monitoring in CI.

Changes Made

Dependencies

  • Added pytest-codspeed==4.2.0 to dev dependencies in pyproject.toml

Benchmarks

Created a new benchmarks/ directory with comprehensive benchmark suites covering:

  • Request Handling (test_benchmark_request_handling.py): Benchmarks for command and query handling, including batch operations
  • Event Handling (test_benchmark_event_handling.py): Benchmarks for event processing and notification event creation
  • Serialization (test_benchmark_serialization.py): Benchmarks for request/response serialization and complex nested structures

CI Integration

  • Added .github/workflows/codspeed.yml workflow that:
    • Runs on pushes to main/master and all pull requests
    • Uses CodSpeed action v4 with simulation mode
    • Uses OIDC authentication for secure runs
    • Runs benchmarks with pytest benchmarks/ --codspeed

Documentation

  • Added CodSpeed badge to README.md linking to the project's CodSpeed dashboard

Next Steps

Once this PR is merged:

  1. The CodSpeed workflow will run and establish baseline performance metrics
  2. Future PRs will automatically receive performance comparison reports
  3. Performance regressions will be visible directly in PR reviews

Testing

The benchmarks are designed to measure real-world performance characteristics of the CQRS framework components including mediator operations, event handling, and data serialization.

- Add pytest-codspeed to dev dependencies
- Create benchmarks directory with sample benchmark files
- Add GitHub Actions workflow for CodSpeed integration
- Add CodSpeed badge to README
@codspeed-hq
Copy link
Contributor Author

codspeed-hq bot commented Jan 23, 2026

Congrats! CodSpeed is installed 🎉

🆕 11 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


Open in CodSpeed

@codspeed-hq codspeed-hq bot marked this pull request as ready for review January 23, 2026 13:54
@vadikko2 vadikko2 merged commit eee0166 into master Jan 23, 2026
8 checks passed
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.

2 participants