Skip to content

Commit 094794a

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Add performance marker for Fast Refresh update (#54154)
Summary: Pull Request resolved: #54154 Adds a prominent vertical "Fast Refresh ⚛︎" marker entry in the performance timeline when a Fast Refresh update is complete. This is available in apps with `performance.mark()` enabled (Canary feature). Changelog: [Internal] Reviewed By: hoxyq Differential Revision: D84624705 fbshipit-source-id: 6c0ae0b8ae0acaaaba559a1854f64218bf5feabb
1 parent 0b68dcf commit 094794a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/react-native/Libraries/Utilities/HMRClient.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,15 @@ Error: ${e.message}`;
233233
pendingUpdatesCount--;
234234
if (pendingUpdatesCount === 0) {
235235
DevLoadingView.hide();
236+
performance.mark('Fast Refresh - Update done', {
237+
detail: {
238+
devtools: {
239+
dataType: 'marker',
240+
color: 'primary',
241+
tooltipText: 'Fast Refresh \u269b',
242+
},
243+
},
244+
});
236245
}
237246
});
238247

0 commit comments

Comments
 (0)