Add CodSpeed performance benchmarking integration #41
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.
Summary
This PR integrates CodSpeed continuous performance testing into the python-cqrs project to enable automated performance monitoring in CI.
Changes Made
Dependencies
pytest-codspeed==4.2.0to dev dependencies inpyproject.tomlBenchmarks
Created a new
benchmarks/directory with comprehensive benchmark suites covering:test_benchmark_request_handling.py): Benchmarks for command and query handling, including batch operationstest_benchmark_event_handling.py): Benchmarks for event processing and notification event creationtest_benchmark_serialization.py): Benchmarks for request/response serialization and complex nested structuresCI Integration
.github/workflows/codspeed.ymlworkflow that:pytest benchmarks/ --codspeedDocumentation
Next Steps
Once this PR is merged:
Testing
The benchmarks are designed to measure real-world performance characteristics of the CQRS framework components including mediator operations, event handling, and data serialization.