Skip to content

Add CodSpeed performance benchmarks#24

Merged
second-ed merged 3 commits intodevfrom
codspeed-wizard-1774556208440
Mar 26, 2026
Merged

Add CodSpeed performance benchmarks#24
second-ed merged 3 commits intodevfrom
codspeed-wizard-1774556208440

Conversation

@codspeed-hq
Copy link
Copy Markdown
Contributor

@codspeed-hq codspeed-hq Bot commented Mar 26, 2026

Summary

  • Added 22 performance benchmarks using pytest-codspeed (already a dev dependency) covering the core modules: Stream, Result, utility functions (compose, all_of, any_of, identity, invert), and new_type.
  • Added a new GitHub Actions workflow (.github/workflows/codspeed.yml) that runs benchmarks on every push to main, on pull requests, and on manual dispatch. It uses OIDC authentication and simulation mode.
  • Added the CodSpeed badge to the README.

Benchmark coverage

  • Stream: map, filter, chained map+filter, fold, partition at small and medium sizes
  • Result: Ok/Err creation, map chaining, and_then chaining, Err short-circuit, unwrap, stream-of-results pipeline
  • Utilities: compose, all_of, any_of, identity, invert
  • NewType: creation with validators, map, creation with converters

Note on runners

This repository belongs to a personal GitHub account. The workflow uses ubuntu-latest runners instead of codspeed-macro runners, which are only available for organization repositories. This means performance variance will be higher than with dedicated macro runners. See walltime docs for more details. Since this workflow uses simulation mode (not walltime), this is less of a concern -- simulation mode provides consistent measurements regardless of runner hardware.

Next steps

  1. Merge this PR and let the first run on main establish baseline measurements.
  2. CodSpeed will then automatically report performance changes on future PRs.
  3. Consider adding benchmarks for par_collect and async_collect if parallel/async performance tracking is desired.

@codspeed-hq codspeed-hq Bot force-pushed the codspeed-wizard-1774556208440 branch from 1819371 to 242ab63 Compare March 26, 2026 20:22
@codspeed-hq
Copy link
Copy Markdown
Contributor Author

codspeed-hq Bot commented Mar 26, 2026

Congrats! CodSpeed is installed 🎉

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


ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Open in CodSpeed

@codspeed-hq codspeed-hq Bot marked this pull request as ready for review March 26, 2026 20:22
@second-ed second-ed merged commit 952a073 into dev Mar 26, 2026
3 checks passed
@second-ed second-ed deleted the codspeed-wizard-1774556208440 branch March 26, 2026 20:48
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