Skip to content

Commit a961a86

Browse files
committed
updates baselines in release mode
1 parent 262ec6e commit a961a86

4 files changed

Lines changed: 301 additions & 288 deletions

File tree

.github/workflows/perf-tests.yml

Lines changed: 6 additions & 1 deletion
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
@@ -52,6 +52,11 @@ jobs:
5252
- name: Build perf-testing package
5353
run: yarn workspace @react-native-windows/perf-testing build
5454

55+
# ── Build & Deploy RNTesterApp-Fabric (for native perf tests) ──
56+
- name: Build and deploy RNTesterApp-Fabric
57+
working-directory: packages/e2e-test-app-fabric
58+
run: yarn windows --release --no-launch --logging
59+
5560
# ── Run Tests ──────────────────────────────────────────
5661
- name: Run perf tests
5762
id: perf-run

packages/@react-native-windows/automation/src/AutomationEnvironment.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,24 @@ export default class AutomationEnvironment extends NodeEnvironment {
209209
// Set up the "Desktop" or Root session
210210
const rootBrowser = await webdriverio.remote(this.rootWebDriverOptions);
211211

212-
// Get the list of windows
213-
const allWindows = await rootBrowser.$$('//Window');
214-
215-
// Find our target window
212+
// Poll for the app window with timeout (cold starts can be slow)
213+
const windowTimeout = 300000; // 5 minutes
214+
const pollInterval = 2000;
215+
const deadline = Date.now() + windowTimeout;
216216
let appWindow: webdriverio.Element | undefined;
217-
for (const window of allWindows) {
218-
if ((await window.getAttribute('Name')) === appName) {
219-
appWindow = window;
217+
218+
while (Date.now() < deadline) {
219+
const allWindows = await rootBrowser.$$('//Window');
220+
for (const window of allWindows) {
221+
if ((await window.getAttribute('Name')) === appName) {
222+
appWindow = window;
223+
break;
224+
}
225+
}
226+
if (appWindow) {
220227
break;
221228
}
229+
await new Promise(resolve => setTimeout(resolve, pollInterval));
222230
}
223231

224232
if (!appWindow) {

packages/e2e-test-app-fabric/test/NativePerfHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const DEFAULT_WARMUP = 2;
2323

2424
export async function navigateToBenchmarkPage(): Promise<void> {
2525
const componentsTab = await app.findElementByTestID('components-tab');
26-
await componentsTab.waitForDisplayed({timeout: 60000});
26+
await componentsTab.waitForDisplayed({timeout: 120000});
2727

2828
await goToComponentExample('Native Perf Benchmark');
2929
}

0 commit comments

Comments
 (0)