Repository navigation
ci(codspeed): add backend CPU benchmarks for uploads and product trees - #475
Merged
Merged
Conversation
- Image uploads: metadata stripping with rotation, and the thumbnail set, on a 12 MP phone JPEG so thumbnails take the JPEG draft path - Product trees: create-request validation, the component tree read at its 1,000-component cap, and the export's read models, JSON and CSV, all from rows built in memory - pytest-codspeed in the tests group and a `just bench` recipe that runs them once
Runs in CodSpeed's CPU simulation mode on pushes to main and on pull requests that touch the backend, uploading with OIDC from a job that holds the only id-token permission in the workflow.
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
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.
Adds CodSpeed benchmarks for the backend code that runs on every upload and every product tree request, measured in CodSpeed's CPU simulation mode. Replaces #462: that one benchmarked the export by validating plain dicts, which the route never does, and its 1280 px test image skipped the JPEG draft step that thumbnail speed depends on.
id-token: write. CI's test run leaves the benchmarks out.Tests:
just backend/bench(7 passed) andjust backend/check. The simulation mode only runs on CodSpeed's runner, so this PR is its first real run.