Repository navigation
Add CodSpeed performance benchmarks - #253
Merged
Merged
Conversation
Contributor
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 #253 +/- ##
=======================================
Coverage 98.30% 98.30%
=======================================
Files 101 101
Lines 30574 30574
=======================================
Hits 30056 30056
Misses 518 518 ☔ 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.
This PR sets up continuous performance tracking with CodSpeed using
pytest-codspeed.What's included
Benchmarks (
benchmarks/, 15 in total, run against a realbpyin CPU simulation mode):test_bench_builder.py: building trees with the builder API. Covers the README example (with and without the Sugiyama arrange step), a 4-bit boolean decoder made of manyBooleanMathnodes, a long chain of math operator expressions, and a small shader tree.test_bench_layout.py:nodebpy.arrangeon pre-built trees, using both thesugiyamaandsimplemethods. The tree is built outside the measured region, so only the layout work is timed.test_bench_codegen.py:to_python()export (withformat=Falseso ruff isn't part of the measurement) for each sample tree, plus running the generated code to rebuild the tree.The benchmarks have their own
conftest.py. It reloadstests/data/test_startup.blendbefore each benchmark and skips the save-to-.blendteardown that the test suite does.CI:
.github/workflows/codspeed.ymlrunsuv run pytest benchmarks/ --codspeedthroughCodSpeedHQ/action@v5insimulationmode onubuntu-latest. It triggers on pushes tomain, on pull requests, and onworkflow_dispatch, and authenticates with OIDC, so no token secret is needed.Other changes: added
pytest-codspeedto thedevdependency group (uv.lockis updated) and added a CodSpeed badge to the README.Running locally
Next steps
mainand post performance reports on later pull requests.tests/layout/corpuscan be added if you want broader layout coverage.