Skip to content

Commit d279b7c

Browse files
Emily Janzerfacebook-github-bot
authored andcommitted
Add point at beginning of InitializeCore
Summary: Also add an optional timestamp param to PerformanceLogger.markPoint() so you can backdate a point Reviewed By: alexeylang Differential Revision: D10149337 fbshipit-source-id: 6cc5f95b34b3293589e7cb41b99cee17bf128163
1 parent 7142e9b commit d279b7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Libraries/Utilities/PerformanceLogger.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ const PerformanceLogger = {
193193
infoLog(extras);
194194
},
195195

196-
markPoint(key: string) {
196+
markPoint(key: string, timestamp?: number) {
197197
if (points[key]) {
198198
if (__DEV__) {
199199
infoLog(
@@ -203,7 +203,7 @@ const PerformanceLogger = {
203203
}
204204
return;
205205
}
206-
points[key] = performanceNow();
206+
points[key] = timestamp ?? performanceNow();
207207
},
208208

209209
getPoints() {

0 commit comments

Comments
 (0)