Skip to content

Add CodSpeed performance benchmarks#209

Open
codspeed-hq[bot] wants to merge 2 commits into
masterfrom
codspeed-wizard-1779733696368
Open

Add CodSpeed performance benchmarks#209
codspeed-hq[bot] wants to merge 2 commits into
masterfrom
codspeed-wizard-1779733696368

Conversation

@codspeed-hq
Copy link
Copy Markdown

@codspeed-hq codspeed-hq Bot commented May 25, 2026

Summary

This PR integrates CodSpeed for continuous performance testing of the OSQP Python solver. It adds a benchmark suite covering the core solver operations and a GitHub Actions workflow that runs these benchmarks on every push to master and on pull requests.

Changes

Benchmark suite (benchmarks/bench_solver.py)

11 benchmarks using pytest-codspeed (compatible with pytest-benchmark API) covering:

  • Setup: Solver initialization across small (n=2), medium (n=50), and large (n=200) QP problems
  • Solve: Solving QP problems at each size
  • Update + solve: Updating linear cost and bounds, then re-solving
  • End-to-end: Full setup and solve cycle (small and medium)
  • Polishing: Solve with the polishing refinement step enabled
  • Warm start: Solve with warm starting from a previous solution

CI workflow (.github/workflows/codspeed.yml)

  • Runs on push to master, pull requests, and workflow_dispatch (for CodSpeed backtesting)
  • Uses OIDC authentication (no token needed)
  • Builds the C++ extension from source, then runs benchmarks in simulation mode
  • Uses CodSpeedHQ/action@v4

README

  • Added CodSpeed badge

Next steps

Once this PR is merged:

  1. Performance results will be tracked on the CodSpeed dashboard
  2. Pull requests will receive automated performance reports comparing against the base branch
  3. Performance regressions will be flagged before they reach master

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codspeed-hq codspeed-hq Bot force-pushed the codspeed-wizard-1779733696368 branch from 1cf24ac to d64b771 Compare May 25, 2026 18:36
@codspeed-hq
Copy link
Copy Markdown
Author

codspeed-hq Bot commented May 25, 2026

Congrats! CodSpeed is installed 🎉

🆕 11 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
Copy link
Copy Markdown
Author

codspeed-hq Bot commented May 25, 2026

Congrats! CodSpeed is installed 🎉

🆕 11 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 May 25, 2026 18:37
@vineetbansal
Copy link
Copy Markdown
Contributor

Note: This PR is experimental, to test out a benchmarking framework I recently learned of. DO NOT MERGE!

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.

2 participants