Add CodSpeed performance benchmarks and CI integration#775
Draft
codspeed-hq[bot] wants to merge 3 commits into
Draft
Add CodSpeed performance benchmarks and CI integration#775codspeed-hq[bot] wants to merge 3 commits into
codspeed-hq[bot] wants to merge 3 commits into
Conversation
a95b692 to
2280850
Compare
Author
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #775 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 86 86
Lines 6848 6848
=========================================
Hits 6848 6848 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR sets up CodSpeed continuous performance testing for starlette-admin. It adds a suite of benchmarks covering the most frequently exercised, CPU-bound code paths and wires up a GitHub Actions workflow to run them on every push and pull request.
Changes
benchmarks/test_benchmarks.py— 10pytest-codspeedbenchmarks targeting pure-CPU, deterministic code paths that need no database, network or event loop:helpers:prettify_class_name,slugify_class_name,get_file_icon,html_params,extract_fieldsfields: field construction,StringField.input_params,BaseField.dict()serializationconverters:StandardModelConverter.convert_fields_listand converter lookup.github/workflows/codspeed.yml— GitHub Actions workflow running the benchmarks withCodSpeedHQ/action@v4insimulationmode, authenticated via OpenID Connect (no token required).README.md— Added the CodSpeed badge.Notes
pytestandpytest-codspeed, keeping the benchmark job lightweight and independent from the heavier ORM test matrix.ruffandblackchecks.Next steps
mainbranch and report deltas on subsequent pull requests.