Skip to content

Commit 3e51123

Browse files
iamAbhi-916acoates-msazure-pipelines[bot]rnbotvmoroz
authored
Port perf tests to 0.83-stable (#15993)
* [Fabric]: Performance Tests for React Native Windows (#15666) * perf testing v1( view , text , textinput) * Fixed spike testing by using median and other issues * chore: gitignore perf-testing build output * remove scripts/ as separate folder * add component perf tests for Button, Image, ScrollView, Switch, Modal, ActivityIndicator, Pressable, TouchableOpacity, TouchableHighlight, FlatList, and SectionList * Cleanup * Change files * lint fix and format * cleanup * fix pipeline issues with cachedAct! * Save PR number to artifact for future report workflow * remove tsconfig from tracking * review comments * update baselines * lint:fix * add statistical stability gates (Mann-Whitney U, CV, gate/track mode) * add maxCV and mode to defaultConfig threshold * Add 100x stress-gate scenarios to all 13 perf suites * lint fix and format * update yarn lock * Bump version to 0.0.0-canary.1033 * Native perf benchmarking infra for Fabric components (#15772) * add native perf benchmarking infrastructure for Fabric components measures rendering pipeline — JS reconciliation → Fabric → Yoga layout → Composition commit → frame Missing Components: Button, Modal, Pressable, TouchableHighlight, TouchableOpacity, SectionList. * Added all 6 missing components * Change files * updates baselines in release mode * add winAppsdk and dev mode * Change files * use winget as installer * use direct download from download.microsoft.com * relax TouchableOpacity bulk threshold in JS test * update snapshots * update snapshots * review comments and segregate native tests * poll for valid perf JSON instead of single read to handle transient UIA failures * nit * lint:fix and format * fix: use --msbuildprops instead of -- /p: for SDK version override * fix: resolve artifact path mismatch in perf-comment workflow (#15883) * fix: include hidden files in perf artifact upload to restore PR comments (#15893) * fix: resolve artifact path mismatch in perf-comment workflow * fix: include hidden files in perf artifact upload * fix: auto-discover native perf results in compare report * Do not create m_childrenContainer when using a custom visual to mount children into (#15877) * Do not create m_childrenContainer when using a custom visual to mount children into * Change files * fix * RELEASE: Releasing 10 package(s) (main) (#15885) Co-authored-by: React-Native-Windows Bot <53619745+rnbot@users.noreply.github.com> * Implement onClick (#15889) * Implement onClick * Change files * RELEASE: Releasing 10 package(s) (main) (#15891) Co-authored-by: React-Native-Windows Bot <53619745+rnbot@users.noreply.github.com> * Fork ubroken module (#15892) * fix: auto-discover native perf results in compare report * Change files * fix: capture live run metrics in PerfJsonReporter instead of re-reading baselines * Change files * fix: use temp files for cross-process live metrics * lint fix * make touchableOpacity less noisy * Change files * codegen build fix * revert: undo codegen changes (schema version mismatch) --------- Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Co-authored-by: azure-pipelines[bot] <36771401+azure-pipelines[bot]@users.noreply.github.com> Co-authored-by: React-Native-Windows Bot <53619745+rnbot@users.noreply.github.com> Co-authored-by: Vladimir Morozov <vmorozov@microsoft.com> * fix: respect track mode in compare-results to avoid false regression (#15933) * fix: respect track mode in compare-results to avoid false regression failures * Change files * fix: update TouchableOpacity multiple-100 baseline to match CI environment * update snapshots --------- Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Co-authored-by: azure-pipelines[bot] <36771401+azure-pipelines[bot]@users.noreply.github.com> Co-authored-by: React-Native-Windows Bot <53619745+rnbot@users.noreply.github.com> Co-authored-by: Vladimir Morozov <vmorozov@microsoft.com>
1 parent 798f7ed commit 3e51123

56 files changed

Lines changed: 1984 additions & 53 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/perf-comment.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,27 @@ jobs:
3232
- name: Read PR number
3333
id: pr
3434
run: |
35-
if [ ! -f perf-results/pr-number.txt ]; then
35+
PR_FILE=$(find perf-results -name pr-number.txt -type f | head -1)
36+
if [ -z "$PR_FILE" ]; then
3637
echo "No PR number file found — skipping."
3738
echo "skip=true" >> "$GITHUB_OUTPUT"
3839
exit 0
3940
fi
40-
PR_NUMBER=$(cat perf-results/pr-number.txt | tr -d '[:space:]')
41+
PR_NUMBER=$(cat "$PR_FILE" | tr -d '[:space:]')
4142
echo "number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
4243
echo "skip=false" >> "$GITHUB_OUTPUT"
4344
4445
- name: Read markdown report
45-
if: steps.pr.outputs.skip != 'true'
4646
id: report
47+
if: steps.pr.outputs.skip != 'true'
4748
run: |
48-
if [ ! -f perf-results/report.md ]; then
49+
REPORT_FILE=$(find perf-results -name report.md -type f | head -1)
50+
if [ -z "$REPORT_FILE" ]; then
4951
echo "No report.md found — skipping."
5052
echo "skip=true" >> "$GITHUB_OUTPUT"
5153
exit 0
5254
fi
55+
echo "path=$REPORT_FILE" >> "$GITHUB_OUTPUT"
5356
echo "skip=false" >> "$GITHUB_OUTPUT"
5457
5558
- name: Post or update PR comment
@@ -59,7 +62,7 @@ jobs:
5962
script: |
6063
const fs = require('fs');
6164
const marker = '<!-- rnw-perf-results -->';
62-
const reportPath = 'perf-results/report.md';
65+
const reportPath = '${{ steps.report.outputs.path }}';
6366
const prNumber = parseInt('${{ steps.pr.outputs.number }}', 10);
6467
6568
const markdown = fs.readFileSync(reportPath, 'utf-8');

.github/workflows/perf-tests.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
perf-tests:
2828
name: Component Performance Tests
2929
runs-on: windows-latest
30-
timeout-minutes: 30
30+
timeout-minutes: 60
3131

3232
permissions:
3333
contents: read
@@ -49,9 +49,29 @@ jobs:
4949
- name: Install dependencies
5050
run: yarn install --frozen-lockfile
5151

52+
- name: Detect preinstalled Windows SDK
53+
id: winsdk
54+
shell: pwsh
55+
run: |
56+
# Find the latest SDK version already installed on the runner
57+
$sdkRoot = "${env:ProgramFiles(x86)}\Windows Kits\10\Include"
58+
$versions = Get-ChildItem $sdkRoot -Directory | Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } | Sort-Object { [version]$_.Name } -Descending
59+
if ($versions.Count -eq 0) {
60+
echo "::error::No Windows SDK found on runner"
61+
exit 1
62+
}
63+
$sdk = $versions[0].Name
64+
echo "version=$sdk" >> $env:GITHUB_OUTPUT
65+
echo "::notice::Using preinstalled Windows SDK $sdk"
66+
5267
- name: Build perf-testing package
5368
run: yarn workspace @react-native-windows/perf-testing build
5469

70+
# ── Build & Deploy RNTesterApp-Fabric (for native perf tests) ──
71+
- name: Build and deploy RNTesterApp-Fabric
72+
working-directory: packages/e2e-test-app-fabric
73+
run: yarn windows --release --no-launch --logging --msbuildprops WindowsTargetPlatformVersion=${{ steps.winsdk.outputs.version }}
74+
5575
# ── Run Tests ──────────────────────────────────────────
5676
- name: Run perf tests
5777
id: perf-run
@@ -61,7 +81,14 @@ jobs:
6181
RN_TARGET_PLATFORM: windows
6282
run: yarn perf:ci
6383
continue-on-error: true # Don't fail here — let comparison decide
64-
84+
- name: Run native perf tests
85+
id: native-perf-run
86+
working-directory: packages/e2e-test-app-fabric
87+
env:
88+
CI: 'true'
89+
RN_TARGET_PLATFORM: windows
90+
run: yarn perf:native:ci
91+
continue-on-error: true
6592
# ── Compare & Report ───────────────────────────────────
6693
- name: Compare against baselines
6794
id: compare
@@ -78,9 +105,12 @@ jobs:
78105
uses: actions/upload-artifact@v4
79106
with:
80107
name: perf-results
108+
include-hidden-files: true
81109
path: |
82110
packages/e2e-test-app-fabric/.perf-results/
111+
packages/e2e-test-app-fabric/.native-perf-results/
83112
packages/e2e-test-app-fabric/test/__perf__/**/__perf_snapshots__/
113+
packages/e2e-test-app-fabric/test/__native_perf__/**/__perf_snapshots__/
84114
retention-days: 30
85115

86116
# ── Status Gate ────────────────────────────────────────
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "fix: auto-discover native perf results in compare report",
4+
"packageName": "@react-native-windows/automation",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "add native perf benchmarking infrastructure for Fabric components",
4+
"packageName": "@react-native-windows/automation",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "fix: auto-discover native perf results in compare report",
4+
"packageName": "@react-native-windows/automation-channel",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "fix: auto-discover native perf results in compare report",
4+
"packageName": "@react-native-windows/automation-commands",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "fix: capture live run metrics in PerfJsonReporter instead of re-reading baselines",
4+
"packageName": "@react-native-windows/codegen",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "fix: capture live run metrics in PerfJsonReporter instead of re-reading baselines",
4+
"packageName": "@react-native-windows/perf-testing",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "add native perf benchmarking infrastructure for Fabric components",
4+
"packageName": "@react-native-windows/perf-testing",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Performance tests for react native windows(Fabric)",
4+
"packageName": "@react-native-windows/perf-testing",
5+
"email": "74712637+iamAbhi-916@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

0 commit comments

Comments
 (0)