Cache benchmark results by base commit - #11684
Open
Bill Schnurr (bschnurr) wants to merge 5 commits into
Open
Conversation
Resolve PR revisions from trusted GitHub metadata before executing benchmark code. Retain and update checked-in baseline results with commit provenance, and add a notebook for benchmark history visualization and dashboard export.
Run candidate benchmarks in an unprivileged pull_request workflow and move trusted base caching, reporting, and baseline persistence to workflow_run. Authorize measured runs through maintainer-triggered reruns and update tests and documentation.
Bill Schnurr (bschnurr)
enabled auto-merge (squash)
August 28, 2026 20:20
Export PNG previews alongside SVG dashboard charts and improve the single-baseline layout until additional hosted runs accumulate.
Run the repository's pinned Prettier formatter after notebook dashboard generation and commit the formatted HTML output.
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
maincommit used to create that merge.What is compared
The candidate is GitHub's synthetic merge commit, which combines the PR's current head with its current
mainbase. The baseline is that same exactmainbase commit:This measures the performance impact the PR would have after merging. It does not compare the PR with its initial commit, benchmark the raw PR head alone, or compare against a moving newer
main. If the PR head or base changes before trusted reporting validates the revisions, the report stops and/benchmarkmust be requested again.Security and behavior
/benchmarkis restricted to maintainers and reruns an existing unprivilegedpull_requestworkflow.workflow_runcode.${{ github.sha }}; candidate output crosses the boundary only as bounded, provenance-validated JSON.latestbaseline files only for same-repository PRs whose head has not changed.Benchmark history
Checked-in results under
build/benchmark/baselines/include the source commit SHA, subject, and timestamp.build/benchmark/benchmark_history.ipynbgraphs execution-time and peak-memory changes across those main commits and can export a static dashboard underdocs/benchmark-results/.Dashboard preview
The checked-in history currently contains one hosted
mainbaseline, so these previews show the initial package measurements. Lines and commit-over-commit changes will appear as dated runs accumulate.Execution time
Peak memory
After merge, the full dashboard will be available at https://microsoft.github.io/pyright/benchmark-results/.
Validation
python -m unittest discover -s build/benchmark -p "test_*.py"(52 tests)