mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-18 22:05:06 +08:00
Migrate PerformanceLoggerFlag to scoped performance logger
Reviewed By: xyin96 Differential Revision: D14385136 fbshipit-source-id: beaf060866ed5b7dee80e18fcd432e7701cff5d3
This commit is contained in:
committed by
Facebook Github Bot
parent
40143519a1
commit
03841cf08c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user