Skip to content

Commit e470cff

Browse files
committed
Performance history canary
This PR adds a "canary" build to the performance regression CI of OpenJDK. The "canary" is a chosen revision of mmtk-core and mmtk-openjdk that is tested alongside each merged PR. The performance of the "canary" should not change unless there is an environment change. Spotting a change in the "canary" performance can help us identify environment changes that are unintended or otherwise unnoticed. TODO: Add a script to select the latest release tag as the canary instead of hard-coding a version.
1 parent 73be50d commit e470cff

File tree

1 file changed

+44
-19
lines changed

1 file changed

+44
-19
lines changed

.github/workflows/perf-regression-ci.yml

+44-19
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,18 @@ jobs:
9898
runs-on: [self-hosted, Linux, freq-scaling-off]
9999
timeout-minutes: 1440
100100
steps:
101-
- name: Checkout MMTk Core
101+
# checkout latest versions
102+
- name: Checkout MMTk Core (latest)
102103
uses: actions/checkout@v4
103104
with:
104-
path: mmtk-core
105-
- name: Checkout OpenJDK Binding
105+
path: latest/mmtk-core
106+
- name: Checkout OpenJDK Binding (latest)
106107
uses: actions/checkout@v4
107108
with:
108109
repository: mmtk/mmtk-openjdk
109-
path: mmtk-openjdk
110-
- name: Checkout OpenJDK
111-
working-directory: mmtk-openjdk
110+
path: latest/mmtk-openjdk
111+
- name: Checkout OpenJDK (latest)
112+
working-directory: latest/mmtk-openjdk
112113
run: |
113114
./.github/scripts/ci-checkout.sh
114115
# checkout perf-kit
@@ -120,21 +121,42 @@ jobs:
120121
path: ci-perf-kit
121122
token: ${{ secrets.CI_ACCESS_TOKEN }}
122123
submodules: true
124+
# checkout canary versions.
125+
# Currently using a release version.
126+
# We need a script to find the latest stable version from a list of tags (`git tags -l`).
127+
# Alternatively, we may use the latest commit in the last epoch once we stablize the idea of epoch.
128+
- name: Checkout MMTk Core (canary)
129+
uses: actions/checkout@v4
130+
with:
131+
ref: "v0.27.0"
132+
path: canary/mmtk-core
133+
- name: Checkout OpenJDK Binding (canary)
134+
uses: actions/checkout@v4
135+
with:
136+
ref: "v0.27.0"
137+
repository: mmtk/mmtk-openjdk
138+
path: canary/mmtk-openjdk
139+
- name: Checkout OpenJDK (canary)
140+
working-directory: canary/mmtk-openjdk
141+
run: |
142+
./.github/scripts/ci-checkout.sh
123143
# setup
124-
- name: Overwrite MMTk core in openjdk binding
125-
run: cp -r mmtk-core mmtk-openjdk/repos/
144+
- name: Setup directory structures
145+
run: |
146+
for BASE_DIR in . ./canary; do
147+
pushd $BASE_DIR
148+
# copy mmtk-core repo
149+
cp -r mmtk-core mmtk-openjdk/repos/
150+
# replace dependency
151+
./mmtk-core/.github/scripts/ci-replace-mmtk-dep.sh mmtk-openjdk/mmtk/Cargo.toml --mmtk-core-path repos/mmtk-core
152+
# cleanup previous build
153+
rm -rf mmtk-openjdk/repos/openjdk/scratch
154+
rm -rf mmtk-openjdk/repos/openjdk/build
155+
popd
156+
done
126157
- name: Setup Rust Toolchain
158+
# This seems unused.
127159
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
128-
# cleanup previosu build
129-
- name: Cleanup previous build
130-
run: |
131-
rm -rf mmtk-openjdk/repos/openjdk/scratch
132-
rm -rf mmtk-openjdk/repos/openjdk/build
133-
- name: Setup
134-
run: |
135-
./ci-perf-kit/scripts/history-run-setup.sh
136-
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk-openjdk/mmtk/Cargo.toml
137-
sed -i 's/^#[[:space:]]mmtk/mmtk/g' mmtk-openjdk/mmtk/Cargo.toml
138160
- id: branch
139161
# we cannot use env vars in action input (the deploy step). So put the env var to this step's outputs.
140162
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" >> $GITHUB_OUTPUT
@@ -145,7 +167,10 @@ jobs:
145167
export RESULT_REPO_BRANCH=${{ env.RESULT_REPO_BRANCH }}
146168
export RESULT_REPO_ACCESS_TOKEN=${{ secrets.CI_ACCESS_TOKEN }}
147169
export FROM_DATE=2020-07-10
148-
./ci-perf-kit/scripts/openjdk-history-run.sh ./mmtk-openjdk ./reports/${{ steps.branch.outputs.branch_name }}
170+
./ci-perf-kit/scripts/openjdk-history-run.sh \
171+
./latest/mmtk-openjdk \
172+
./canary/mmtk-openjdk \
173+
./reports/${{ steps.branch.outputs.branch_name }}
149174
# deploy
150175
- name: Deploy to Github Page
151176
if: ${{ env.DEPLOY == 'true' }}

0 commit comments

Comments
 (0)