Skip to content

Add CodSpeed performance benchmarks#1

Merged
Ashishsonavane merged 3 commits intomasterfrom
codspeed-wizard-1771680455276
Feb 21, 2026
Merged

Add CodSpeed performance benchmarks#1
Ashishsonavane merged 3 commits intomasterfrom
codspeed-wizard-1771680455276

Conversation

@codspeed-hq
Copy link

@codspeed-hq codspeed-hq bot commented Feb 21, 2026

Summary

This PR sets up continuous performance testing with CodSpeed for the repository.

Changes

  • pytest-codspeed dependency: Added pytest-codspeed>=4.3.0 to the test dependency group for benchmark instrumentation.
  • Benchmark suite (benchmarks/test_benchmarks.py): Created 8 benchmarks covering core algorithm implementations:
    • Sorting: bubble sort, heap sort, insertion sort, merge sort, quick sort, selection sort
    • Searching: binary search (iterative), binary search (recursive)
  • CI workflow (.github/workflows/codspeed.yml): Added a GitHub Actions workflow that runs benchmarks on pushes to master, pull requests, and manual triggers. Uses OIDC authentication and simulation mode.
  • README badge: Added a CodSpeed badge to the README.

How it works

CodSpeed instruments the benchmarks using CPU simulation to provide consistent, reproducible performance measurements regardless of CI runner hardware. This catches performance regressions automatically on every pull request.

Next steps

  • Review the benchmark results on the CodSpeed dashboard once the first run completes.
  • Consider adding more benchmarks for other algorithm categories (dynamic programming, graph algorithms, etc.) as needed.
  • Performance checks can be enabled to block merging PRs that introduce regressions. See the CodSpeed docs for details.

@github-actions github-actions bot force-pushed the codspeed-wizard-1771680455276 branch from 5f2bc57 to 13e453d Compare February 21, 2026 13:33
@github-actions github-actions bot force-pushed the codspeed-wizard-1771680455276 branch from 13e453d to 17f96bc Compare February 21, 2026 13:33
The project depends on keras which requires h5py, and h5py needs
libhdf5 to build from source on Python 3.14.
@codspeed-hq codspeed-hq bot force-pushed the codspeed-wizard-1771680455276 branch from 00ad7d2 to bc7c4a2 Compare February 21, 2026 13:35
@github-actions github-actions bot force-pushed the codspeed-wizard-1771680455276 branch from bc7c4a2 to 00ad7d2 Compare February 21, 2026 13:35
@codspeed-hq
Copy link
Author

codspeed-hq bot commented Feb 21, 2026

Congrats! CodSpeed is installed 🎉

🆕 8 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 February 21, 2026 13:54
@Ashishsonavane Ashishsonavane merged commit 9e11851 into master Feb 21, 2026
1 check passed
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