Test repository for evaluating CodSpeed continuous benchmarking service.
This package includes:
- C++ extension: NumPy-interfaced module for computing sum of squares
- Cython extension: Optimized Fibonacci number computation
- CodSpeed benchmarks: Performance tests using
pytest-codspeed - Overhead tests: Identical tests without benchmarking for comparison
Install dependencies with pixi:
pixi installBuild the package:
pixi run buildRun CodSpeed benchmarks:
pixi run benchmarkRun overhead comparison tests:
pixi run test-overheadRun all tests:
pixi run testThe GitHub Actions workflow (.github/workflows/codspeed.yml) automatically:
- Builds the package on
ubuntu-latestrunners - Runs benchmarks with CodSpeed on pushes and PRs
- Uses OIDC authentication for secure integration with CodSpeed
src/codspeed_trial/
├── __init__.py
├── cpp_ext.cpp # C++ extension with NumPy
└── cy_ext.pyx # Cython extension
tests/
├── test_benchmarks.py # CodSpeed benchmark suite
└── test_overhead.py # Non-benchmarked tests for overhead comparison
- cpp_ext.sum_of_squares: Computes Σx² for 1D float64 arrays
- cy_ext.fibonacci: Computes nth Fibonacci number with Cython optimization