use perf_hooks
Summary: We were using `window.performance` to measure performance. This was because the equivalent node.js API `perf_hooks` wasn't available in the electron version we were using back then. However, `perf_hooks` has landed in electron meanwhile, so I am moving to this API, as it works for the headless version and jest tests, too. This allows us to delete the babel transform that was used for node-based tests, where the browser API was replaced with the node API Reviewed By: jknoxville Differential Revision: D13860133 fbshipit-source-id: cf1395004fac046dd55751ff465af494173b2cbf
This commit is contained in:
committed by
Facebook Github Bot
parent
26266bc607
commit
500007ccca
@@ -14,6 +14,8 @@ import type {OS} from './devices/BaseDevice.js';
|
||||
import {FlipperDevicePlugin} from './plugin.js';
|
||||
import {setPluginState} from './reducers/pluginStates.js';
|
||||
import {ReactiveSocket, PartialResponder} from 'rsocket-core';
|
||||
// $FlowFixMe perf_hooks is a new API in node
|
||||
import {performance} from 'perf_hooks';
|
||||
|
||||
const EventEmitter = (require('events'): any);
|
||||
const invariant = require('invariant');
|
||||
|
||||
Reference in New Issue
Block a user