Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: respect track mode in compare-results to avoid false regression failures",
"packageName": "react-native-windows",
"email": "74712637+iamAbhi-916@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,21 @@
"TouchableOpacity Performance TouchableOpacity-Specific Scenarios multiple-touchables-100 1": {
"metrics": {
"name": "TouchableOpacity multiple-100",
"meanDuration": 30.666666666666668,
"medianDuration": 30,
"stdDev": 3.6774732526300613,
"meanDuration": 50.27,
"medianDuration": 50,
"stdDev": 5.5,
"renderCount": 1,
"runs": 15,
"timestamp": "2026-02-25T08:49:05.289Z"
"timestamp": "2026-04-06T00:00:00.000Z"
},
"threshold": {
"maxDurationIncrease": 10,
"maxDurationIncrease": 30,
"maxDuration": null,
"minAbsoluteDelta": 10,
"minAbsoluteDelta": 15,
"maxRenderCount": 5,
"minRuns": 10,
"mode": "gate"
"mode": "track"
},
"capturedAt": "2026-02-25T08:49:05.290Z"
"capturedAt": "2026-04-06T00:00:00.000Z"
}
}
22 changes: 21 additions & 1 deletion vnext/Scripts/perf/compare-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function compareEntry(head, base, threshold) {
: 0;

const errors = [];
const isTrackMode = threshold.mode === 'track';

const absoluteDelta = head.medianDuration - base.medianDuration;
const minAbsoluteDelta =
Expand Down Expand Up @@ -138,8 +139,9 @@ function compareEntry(head, base, threshold) {
head,
base,
percentChange,
passed: errors.length === 0,
passed: isTrackMode || errors.length === 0,
errors,
isTrackMode,
};
}

Expand Down Expand Up @@ -219,6 +221,24 @@ function generateMarkdown(suiteComparisons, ciResults) {
}
}

// Track-mode warnings (not blocking)
const trackedWarnings = suiteComparisons.flatMap(s =>
s.results.filter(r => r.isTrackMode && r.errors.length > 0),
);
if (trackedWarnings.length > 0) {
md += '### ⚠️ Tracked (not blocking)\n\n';
md += '| Scenario | Baseline | Current | Change |\n';
md += '|----------|----------|---------|--------|\n';
for (const r of trackedWarnings) {
const baseline = r.base ? `${r.base.meanDuration.toFixed(2)}ms` : 'N/A';
const current = r.head ? `${r.head.meanDuration.toFixed(2)}ms` : 'N/A';
const change =
r.percentChange != null ? `+${r.percentChange.toFixed(1)}%` : 'N/A';
md += `| ${r.name} | ${baseline} | ${current} | ${change} |\n`;
}
md += '\n';
}

// Passed suites
const passedSuites = suiteComparisons.filter(s => !s.hasRegressions);
if (passedSuites.length > 0) {
Expand Down
Loading