Skip to content

Setup CodSpeed#104

Merged
aminalaee merged 6 commits intomainfrom
setup-codspeed-1767610965593
Jan 5, 2026
Merged

Setup CodSpeed#104
aminalaee merged 6 commits intomainfrom
setup-codspeed-1767610965593

Conversation

@codspeed-hq
Copy link
Contributor

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

Summary

This PR integrates CodSpeed for continuous performance monitoring of the uuid-utils library. CodSpeed provides accurate, reproducible performance measurements in CI environments using specialized instrumentation.

Changes Made

  • Added pytest-codspeed (v4.2.0) to project dependencies in requirements.txt
  • Created comprehensive benchmarks in tests/test_benchmarks.py covering:
    • UUID generation (v1, v3, v4, v5) for both stdlib and uuid-utils
    • UUID parsing from hex, bytes, int, and fields for both implementations
  • Added GitHub Actions workflow .github/workflows/codspeed.yml with:
    • Triggers on pushes to main, pull requests, and manual dispatch
    • OIDC authentication for secure run submission
    • Proper build setup using PyO3/maturin-action
    • Simulation mode for consistent measurements
  • Added CodSpeed badge to README for tracking performance trends

How It Works

The new benchmark suite uses pytest-codspeed's @pytest.mark.benchmark decorator to measure individual operations. Each benchmark compares stdlib UUID operations against uuid-utils implementations, allowing CodSpeed to track performance differences over time.

The GitHub Actions workflow builds the Rust extension using maturin, installs dependencies, and runs the benchmarks with CodSpeed's instrumentation to generate performance profiles.

Next Steps

After merging this PR:

  1. Visit the CodSpeed dashboard to view initial benchmark results
  2. Enable CodSpeed performance checks to get automatic feedback on PRs
  3. Review the flame graphs and execution profiles to identify optimization opportunities
  4. Consider adding more benchmarks for uuid6, uuid7, and uuid8 operations

The CodSpeed badge in the README will automatically update to show the latest performance status.

codspeed-hq bot and others added 2 commits January 5, 2026 11:07
- Add pytest-codspeed 4.2.0 to requirements.txt
- Create comprehensive benchmarks in tests/test_benchmarks.py
- Add GitHub Actions workflow for CodSpeed integration
- Add CodSpeed badge to README
@aminalaee aminalaee force-pushed the setup-codspeed-1767610965593 branch from 1ea72a9 to 4c193a3 Compare January 5, 2026 11:23
@aminalaee aminalaee changed the title Add CodSpeed for continuous performance monitoring Setup CodSpeed Jan 5, 2026
@aminalaee aminalaee force-pushed the setup-codspeed-1767610965593 branch from f97ee5a to e0a9e81 Compare January 5, 2026 11:30
@aminalaee aminalaee force-pushed the setup-codspeed-1767610965593 branch from ebb07ee to ff9b87d Compare January 5, 2026 12:25
@codspeed-hq
Copy link
Contributor Author

codspeed-hq bot commented Jan 5, 2026

CodSpeed Performance Report

Congrats! CodSpeed is installed 🎉

🆕 12 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

@aminalaee aminalaee merged commit 78a4073 into main Jan 5, 2026
28 checks passed
@aminalaee aminalaee deleted the setup-codspeed-1767610965593 branch January 5, 2026 12:58
@aminalaee aminalaee mentioned this pull request Jan 8, 2026
aminalaee added a commit that referenced this pull request Jan 14, 2026
Co-authored-by: Amin Alaee <amin.alaee.zaviyeh@postnl.nl>
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.

1 participant