Migrate PerformanceLoggerFlag to scoped performance logger

Reviewed By: xyin96

Differential Revision: D14385136

fbshipit-source-id: beaf060866ed5b7dee80e18fcd432e7701cff5d3
This commit is contained in:
Alexey Lang
2019-03-14 06:45:25 -07:00
committed by Facebook Github Bot
parent 40143519a1
commit 03841cf08c

View File

@@ -42,6 +42,7 @@ export type IPerformanceLogger = {
markPoint(string, number | void): void,
getPoints(): {[key: string]: number},
logPoints(): void,
logEverything(): void,
};
const _cookies: {[key: string]: number} = {};
@@ -242,6 +243,12 @@ function createPerformanceLogger(): IPerformanceLogger {
infoLog(key + ': ' + this._points[key] + 'ms');
}
},
logEverything() {
this.logTimespans();
this.logExtras();
this.logPoints();
},
};
return result;
}