-
Notifications
You must be signed in to change notification settings - Fork 436
Performance gate: per-PR baseline overlays, so baselines stop conflicting #5930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7ca5571
Performance gate: per-PR baseline overlays, so baselines stop conflic…
shai-almog 709d4e6
Merge origin/master: re-migrate perf-baseline.json as #5927 left it
shai-almog 0f3252a
Perf baselines: repairable merged overlays, safer combine and import,…
shai-almog b2d883f
Perf baselines: recalibrate bimodal stringBuilding RAM; tolerance-awa…
shai-almog f6138aa
Perf baselines: recalibrate Zen 3 translator and hello time; refuse l…
shai-almog 7fe248f
Perf baselines: a stale own overlay is re-measured, not a dead end; s…
shai-almog 071a909
Perf baselines: a superseded own calibration is rebaselined from the …
shai-almog 4ea3437
Perf baselines: rebaselines of one row chain instead of waiting for t…
shai-almog 1e4a897
Perf baselines: refuse calibrating an undecodable CPU beside per-mode…
shai-almog 79c7a68
Website build runs when the JDK 25 table's renderer changes
shai-almog ba36b34
Perf baselines: a reason per rebaselined row; per-cell CPU coverage i…
shai-almog 9526f92
Perf gate: the calibration command carries --reason when the run also…
shai-almog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| name: Performance baselines | ||
|
|
||
| # The ParparVM performance gate's baselines live in vm/selfhost/perf-baseline/: | ||
| # base/ holds the consolidated rows, and each pull request that changes a baseline | ||
| # writes only its own pr/<number>.json, so baseline changes stay in the pull | ||
| # request's diff without two branches ever editing the same file | ||
| # (vm/selfhost/perf_baseline.py explains the layout). | ||
| # | ||
| # check every pull request: the overlays resolve against base/ without | ||
| # contradicting each other, and the pull request touched only its own | ||
| # overlay (base/ is the fold's alone). No paths filter: several of this | ||
| # repository's pull requests exceed GitHub's paths-filter diff limit, and a | ||
| # filtered check would silently not run on exactly those. | ||
| # fold nightly on master: every overlay on master belongs to a merged pull | ||
| # request, so it is folded into base/ and deleted, in one commit that | ||
| # provably changes no verdict. Then the website is rebuilt, because the | ||
| # Port Status page's ParparVM vs JDK 25 table is rendered from these rows. | ||
| # A push made with GITHUB_TOKEN triggers no workflow, hence the dispatch. | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| push: | ||
| branches: | ||
| - master | ||
| schedule: | ||
| - cron: '20 3 * * *' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| check: | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| # The pull request's base commit has to be present for the diff. | ||
| fetch-depth: 0 | ||
|
|
||
| - name: The gate's own unit tests | ||
| working-directory: vm/selfhost | ||
| run: python3 -m unittest test_perf_gate | ||
|
|
||
| - name: Check the baselines | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| if [ -n "${BASE_SHA}" ]; then | ||
| python3 vm/selfhost/perf_baseline.py check --base "${BASE_SHA}" --pr "${PR_NUMBER}" | ||
| else | ||
| python3 vm/selfhost/perf_baseline.py check | ||
| fi | ||
|
|
||
| fold: | ||
| if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: write | ||
| actions: write | ||
| concurrency: | ||
| group: perf-baseline-fold | ||
| cancel-in-progress: false | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: master | ||
|
|
||
| - name: Fold merged overlays into base/ | ||
| id: fold | ||
| run: | | ||
| set -euo pipefail | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| # A merge landing while this runs makes the push non-fast-forward. Start over | ||
| # from the new master rather than rebasing: the fold is cheap, and redoing it | ||
| # folds the overlay that just arrived as well. | ||
| for attempt in 1 2 3; do | ||
| git fetch --quiet origin master | ||
| git reset --quiet --hard origin/master | ||
| python3 vm/selfhost/perf_baseline.py fold | ||
| git add -A vm/selfhost/perf-baseline | ||
| if git diff --staged --quiet; then | ||
| echo "No overlays to fold." | ||
| echo "folded=false" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| git diff --staged --stat | ||
| git commit --quiet -m "ci: fold merged performance baselines into perf-baseline/base" | ||
| if git push origin HEAD:master; then | ||
| echo "folded=true" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| echo "master moved during the fold (attempt ${attempt}); retrying." | ||
| done | ||
| echo "Could not push the fold after 3 attempts." >&2 | ||
| exit 1 | ||
|
|
||
| # One-shot on purpose. If this dispatch fails after the fold was pushed, a re-run | ||
| # finds nothing to fold and skips it -- and that is acceptable: website-docs.yml | ||
| # also rebuilds on its own daily schedule (and port-status-nightly dispatches it), | ||
| # so the JDK 25 table, which shows gate baselines rather than live results, is at | ||
| # most a day behind. Persisting a "rebuild owed" flag to close that window would | ||
| # add state for no visible benefit. | ||
| - name: Rebuild the Port Status page | ||
| if: steps.fold.outputs.folded == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: gh workflow run website-docs.yml --ref master -f deploy_production=true | ||
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.