Skip to content

Add CodSpeed performance benchmarks#8

Closed
codspeed-hq[bot] wants to merge 1 commit intomainfrom
codspeed-wizard-1776168707686
Closed

Add CodSpeed performance benchmarks#8
codspeed-hq[bot] wants to merge 1 commit intomainfrom
codspeed-wizard-1776168707686

Conversation

@codspeed-hq
Copy link
Copy Markdown

@codspeed-hq codspeed-hq bot commented Apr 14, 2026

Summary

  • Added performance benchmarks using pytest-codspeed to track the performance of suby's core functions: argument parsing (split_argument, convert_arguments) and end-to-end subprocess execution (run).
  • Created a GitHub Actions workflow (.github/workflows/codspeed.yml) that runs benchmarks in simulation mode on pushes to main, pull requests, and manual triggers. Uses OIDC authentication.
  • Added the CodSpeed badge to the README.

What's benchmarked

  • split_argument: simple command strings and strings with quoted arguments
  • convert_arguments: single string, multiple strings, Path objects, and split-disabled mode
  • run: end-to-end subprocess execution with a minimal command

Next steps

  • Once this PR is merged, CodSpeed will start tracking performance on every push to main and on pull requests.
  • Visit the CodSpeed dashboard to view results and configure performance checks.
  • You can expand the benchmark suite over time to cover additional scenarios (e.g., commands with cancellation tokens, custom callbacks, or timeouts).

Test plan

  • Benchmarks run successfully locally with pytest --codspeed
  • Benchmarks verified with codspeed run -m simulation -- pytest tests/test_benchmarks.py --codspeed
  • Ruff linting passes on the new benchmark file

@codspeed-hq
Copy link
Copy Markdown
Author

codspeed-hq bot commented Apr 14, 2026

Congrats! CodSpeed is installed 🎉

🆕 7 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 April 14, 2026 12:17
@pomponchik
Copy link
Copy Markdown
Collaborator

Added it in #7.

@pomponchik pomponchik closed this Apr 14, 2026
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