Revert D14186694: [RN] Use global or scoped performance loggers everywhere

Differential Revision:
D14186694

Original commit changeset: 062c76eea8fc

fbshipit-source-id: 6d99b94d21da6df4375e342fdecceeebf05959d5
This commit is contained in:
Alexander Zhang
2019-03-07 13:08:01 -08:00
committed by Facebook Github Bot
parent 136666e2e7
commit efd28bdc84
7 changed files with 10 additions and 92 deletions

View File

@@ -44,12 +44,12 @@ if (__DEV__) {
require('setUpDeveloperTools');
}
const GlobalPerformanceLogger = require('GlobalPerformanceLogger');
// We could just call GlobalPerformanceLogger.markPoint at the top of the file,
// but then we'd be excluding the time it took to require the logger.
const PerformanceLogger = require('GlobalPerformanceLogger');
// We could just call PerformanceLogger.markPoint at the top of the file,
// but then we'd be excluding the time it took to require PerformanceLogger.
// Instead, we just use Date.now and backdate the timestamp.
GlobalPerformanceLogger.markPoint(
PerformanceLogger.markPoint(
'initializeCore_start',
GlobalPerformanceLogger.currentTimestamp() - (Date.now() - start),
PerformanceLogger.currentTimestamp() - (Date.now() - start),
);
GlobalPerformanceLogger.markPoint('initializeCore_end');
PerformanceLogger.markPoint('initializeCore_end');