fix: better reordering detection when remoteClearsLocal is true #9291
Workflow file for this run
This file contains 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
name: Performance Checks | |
on: | |
pull_request: | |
branches: | |
- main | |
- v4-main | |
types: | |
- labeled | |
- synchronize | |
- ready_for_review | |
env: | |
TURBO_API: http://127.0.0.1:9080 | |
TURBO_TOKEN: this-is-not-a-secret | |
TURBO_TEAM: myself | |
concurrency: | |
group: perf-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
performance-checks: | |
if: contains(github.event.pull_request.labels.*.name, 'ci-perf') | |
name: 'Performance Checks' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 3 | |
- run: git fetch origin main --depth=1 | |
- name: Check SHA | |
run: | | |
sha=$(git rev-parse --short=8 HEAD) | |
echo "HEAD sha=$sha" | |
echo "GITHUB_SHA sha=$GITHUB_SHA" | |
mkdir -p tmp | |
echo $sha > tmp/sha-for-check.txt | |
originSha=$(git rev-parse HEAD^2) | |
echo $originSha > tmp/sha-for-commit.txt | |
git show --format=short --no-patch $originSha | |
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
- uses: actions/setup-node@v4 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Get Browser Flags | |
id: browser-flags | |
run: | | |
BROWSER_FLAGS=$(node ./scripts/perf-tracking/browser-flags.mjs) | |
echo "BROWSER_FLAGS=$BROWSER_FLAGS" >> $GITHUB_OUTPUT | |
#env: | |
# DEBUG: true | |
- uses: tracerbench/tracerbench-compare-action@6b56fb774f78e4a85cf02396412b0164870cdab3 | |
with: | |
experiment-build-command: pnpm --filter performance-test-app build --outDir dist-experiment | |
experiment-serve-command: pnpm --filter performance-test-app start dist-experiment -p 4201 | |
control-build-command: pnpm --filter performance-test-app build --outDir dist-control | |
control-serve-command: pnpm --filter performance-test-app start dist-control -p 4200 | |
control-sha: origin/main | |
sample-timeout: 60 | |
use-pnpm: true | |
browser-args: ${{ steps.browser-flags.outputs.BROWSER_FLAGS }} | |
scenarios: | | |
{ | |
"basic-record-materialization": { | |
"control": "http://localhost:4200/basic-record-materialization", | |
"experiment": "http://localhost:4201/basic-record-materialization", | |
"markers": "start-data-generation,start-push-payload,start-peek-records,start-record-materialization,end-record-materialization" | |
}, | |
"complex-record-materialization": { | |
"control": "http://localhost:4200/complex-record-materialization", | |
"experiment": "http://localhost:4201/complex-record-materialization", | |
"markers": "start-data-generation,start-push-payload,start-peek-records,start-record-materialization,end-record-materialization" | |
}, | |
"complex-record-materialization-with-relationship-materialization": { | |
"control": "http://localhost:4200/complex-record-materialization-with-relationship-materialization", | |
"experiment": "http://localhost:4201/complex-record-materialization-with-relationship-materialization", | |
"markers": "start-data-generation,start-push-payload,start-peek-records,start-record-materialization,start-field-access,start-relationship-access,end-relationship-access" | |
}, | |
"relationship-materialization-simple": { | |
"control": "http://localhost:4200/relationship-materialization-simple", | |
"experiment": "http://localhost:4201/relationship-materialization-simple", | |
"markers": "start-find-all,start-materialization,end-materialization" | |
}, | |
"relationship-materialization-complex": { | |
"control": "http://localhost:4200/relationship-materialization-complex", | |
"experiment": "http://localhost:4201/relationship-materialization-complex", | |
"markers": "start-data-generation,start-push-payload,start-peek-records,start-record-materialization,start-relationship-materialization,start-push-payload2,start-relationship-materialization2,end-relationship-materialization2" | |
}, | |
"unload": { | |
"control": "http://localhost:4200/unload", | |
"experiment": "http://localhost:4201/unload", | |
"markers": "start-push-payload,start-unload-records,end-unload-records" | |
}, | |
"unload-all": { | |
"control": "http://localhost:4200/unload-all", | |
"experiment": "http://localhost:4201/unload-all", | |
"markers": "start-push-payload,start-materialization,start-unload-all,end-unload-all" | |
}, | |
"destroy": { | |
"control": "http://localhost:4200/destroy", | |
"experiment": "http://localhost:4201/destroy", | |
"markers": "start-push-payload,start-destroy-records,end-destroy-records" | |
}, | |
"add-children": { | |
"control": "http://localhost:4200/add-children", | |
"experiment": "http://localhost:4201/add-children", | |
"markers": "start-push-initial-payload,start-push-update-payload,end-push-update-payload" | |
}, | |
"unused-relationships": { | |
"control": "http://localhost:4200/unused-relationships", | |
"experiment": "http://localhost:4201/unused-relationships", | |
"markers": "start-push-payload,end-push-payload" | |
}, | |
"update-with-same-state": { | |
"control": "http://localhost:4200/update-with-same-state", | |
"experiment": "http://localhost:4201/update-with-same-state", | |
"markers": "start-data-generation,start-push-initial-payload,start-peek-records,start-record-materialization,start-relationship-materialization,start-local-removal,start-push-minus-one-payload,start-local-addition,start-push-plus-one-payload,end-push-plus-one-payload" | |
}, | |
"update-with-same-state-m2m": { | |
"control": "http://localhost:4200/update-with-same-state-m2m", | |
"experiment": "http://localhost:4201/update-with-same-state-m2m", | |
"markers": "start-data-generation,start-push-initial-payload,start-peek-records,start-record-materialization,start-relationship-materialization,start-local-removal,start-push-minus-one-payload,start-local-addition,start-push-plus-one-payload,end-push-plus-one-payload" | |
} | |
} | |
fidelity: 60 | |
upload-traces: true | |
upload-results: true | |
# env: | |
# DEBUG: '*,-babel*,-vite*,-rollup*,-ember*,-broccoli*,-pnpm*,-embroider*,-tree-sync*,-fs-tree-diff*' | |
# - name: Upload Assets | |
# if: failure() || success() | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: built-files | |
# path: 'tests/performance/dist-*' | |
# retention-days: 1 | |
- name: Report TracerBench Results | |
if: failure() || success() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
COMMENT_MARKER="Performance Report for " | |
sha=$(cat tmp/sha-for-commit.txt) | |
node ./scripts/perf-tracking/create-comment.js $sha > tracerbench-results/comment.txt | |
COMMENT_TEXT="@./tracerbench-results/comment.txt" | |
source scripts/asset-size-tracking/src/post-comment.sh |