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
This commit is contained in:
Emily Janzer 2018-10-05 18:20:50 -07:00 committed by Facebook Github Bot
parent 7142e9b1c5
commit d279b7c74d
1 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ const PerformanceLogger = {
infoLog(extras);
},
markPoint(key: string) {
markPoint(key: string, timestamp?: number) {
if (points[key]) {
if (__DEV__) {
infoLog(
@ -203,7 +203,7 @@ const PerformanceLogger = {
}
return;
}
points[key] = performanceNow();
points[key] = timestamp ?? performanceNow();
},
getPoints() {