Fix the issue where perf events were not getting logged

Summary: I noticed a bug where the export data perf events were not logged. The issue was that, it used the `Logger.getTrackTimeSince` method which used the `performance` from `perf-hooks` and not an ordinary performance object available in the global scope. So just importing performance from perf-hooks solved the issue.

Reviewed By: mweststrate

Differential Revision: D18887666

fbshipit-source-id: 66c24f47b95b25d2f3703c16c70cbe8b35fe0ec3
This commit is contained in:
Pritesh Nandgaonkar
2019-12-10 08:19:53 -08:00
committed by Facebook Github Bot
parent 41a5fa2ba0
commit 938f9542ee

View File

@@ -42,6 +42,7 @@ import {
} from '../reducers/supportForm'; } from '../reducers/supportForm';
import {setSelectPluginsToExportActiveSheet} from '../reducers/application'; import {setSelectPluginsToExportActiveSheet} from '../reducers/application';
import {deconstructClientId, deconstructPluginKey} from '../utils/clientUtils'; import {deconstructClientId, deconstructPluginKey} from '../utils/clientUtils';
import {performance} from 'perf_hooks';
export const IMPORT_FLIPPER_TRACE_EVENT = 'import-flipper-trace'; export const IMPORT_FLIPPER_TRACE_EVENT = 'import-flipper-trace';
export const EXPORT_FLIPPER_TRACE_EVENT = 'export-flipper-trace'; export const EXPORT_FLIPPER_TRACE_EVENT = 'export-flipper-trace';