From 938f9542ee488c7d570a30061e601c03e4a633db Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Tue, 10 Dec 2019 08:19:53 -0800 Subject: [PATCH] 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 --- src/utils/exportData.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/exportData.tsx b/src/utils/exportData.tsx index 2241cd56e..957fe9a5d 100644 --- a/src/utils/exportData.tsx +++ b/src/utils/exportData.tsx @@ -42,6 +42,7 @@ import { } from '../reducers/supportForm'; import {setSelectPluginsToExportActiveSheet} from '../reducers/application'; import {deconstructClientId, deconstructPluginKey} from '../utils/clientUtils'; +import {performance} from 'perf_hooks'; export const IMPORT_FLIPPER_TRACE_EVENT = 'import-flipper-trace'; export const EXPORT_FLIPPER_TRACE_EVENT = 'export-flipper-trace';