Repository navigation
ci: add CodSpeed performance benchmarks - #631
Draft
codspeed[bot] wants to merge 1 commit into
Draft
codspeed[bot] wants to merge 1 commit into
codspeed[bot] wants to merge 1 commit into
Conversation
Add a pytest-codspeed benchmark suite covering the CPU-bound planning and transcript-processing paths, a hash-pinned benchmark requirements file, and a CodSpeed GitHub Actions workflow running in simulation mode.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Author
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 continuous performance tracking with CodSpeed. It adds a
pytest-codspeedbenchmark suite and a GitHub Actions workflow that runs it on every push tomainand on every pull request.What changed
benchmarks/: a new pytest benchmark suite with 21 benchmarks. It lives outsidetests/, sopython -m unittest discover -s testsdoes not pick it up.test_bench_media_shrinker.pycovers the CPU-bound paths of the CLI:parse_silencedetect_intervalson 100 and 5,000 silence logsbuild_segmentswith silence-aligned splits and with hard splits only_parse_probe_payloadon a multi-stream ffprobe payloadbuild_audio_planfor FLAC, Opus, AAC and MP3 across every segment of a 12h recordingcalculate_audio_bitratetest_bench_transcripts.pycovers transcript post-processing:TranscriptIndexbuild, search and tokenizationdiarize.merge_with_transcriptchapters.detect_chaptersand chapter serializationsummarize.summarize_segmentsbenchmarks/requirements-bench.txt: hash-pinnedpytestandpytest-codspeed, compiled fromrequirements-bench.in. It follows the same pattern asfuzz/requirements-fuzz.txt. The benchmarked modules are stdlib-only, so the job does not need the full runtime lock..github/workflows/codspeed.yml: runs the suite insimulationmode onubuntu-latestand authenticates with OIDC (id-token: write), so no secret is needed. It follows the conventions of the existing workflows:CodSpeedHQ/actionv5.2.1)persist-credentials: falseconcurrencygroup andpaths-ignorerulesworkflow_dispatch, so CodSpeed can backfill baseline datatests/test_workflow_security.py: now also checks the new workflow, so its checkout step keepspersist-credentials: false.README.md: adds the CodSpeed badge and a short "Benchmarks" section.Running locally
All 21 benchmarks passed locally under
codspeed run --mode simulation.Next steps
mainsets the baseline. After that, each PR gets a performance report comment.rust-core) is mostly filesystem work (inventory, hashing, staging). If you want to track it too, the next step is a divan benchmark viacodspeed-divan-compat, run in walltime mode on CodSpeed macro runners.