mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use global Performance instance in createPerformanceLogger (#37337)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37337 Changelog: [Internal] Removes usage of a local `Performance` instance, since this the global one is now safe to use. Reviewed By: christophpurrer Differential Revision: D45697243 fbshipit-source-id: 4f3f9798e79c15295094d5a4650af04db2856f60
This commit is contained in:
committed by
Facebook GitHub Bot
parent
19927867bb
commit
c71fa46eb8
@@ -16,7 +16,6 @@ import type {
|
||||
} from './IPerformanceLogger';
|
||||
|
||||
import * as Systrace from '../Performance/Systrace';
|
||||
import Performance from '../WebPerformance/Performance';
|
||||
import infoLog from './infoLog';
|
||||
|
||||
const _cookies: {[key: string]: number, ...} = {};
|
||||
@@ -27,9 +26,6 @@ const PRINT_TO_CONSOLE: false = false; // Type as false to prevent accidentally
|
||||
// used to separate these internally from other marks/measures
|
||||
const WEB_PERFORMANCE_PREFIX = 'global_perf_';
|
||||
|
||||
// TODO: Remove once T143070419 is done
|
||||
const performance = new Performance();
|
||||
|
||||
export const getCurrentTimestamp: () => number =
|
||||
global.nativeQPLTimestamp ?? global.performance.now.bind(global.performance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user