From a37d48d67e056007b0992ff250f9f6d0e06c66a2 Mon Sep 17 00:00:00 2001 From: Nicole Stiliyan Vukadinova Date: Tue, 28 Jul 2020 07:21:29 -0700 Subject: [PATCH] Fix the inconsistency in the timestamps for markerStart and markerEnd Summary: There was in inconsistency in the timestamps used for markerStart and markerEnd, resulting in negative duration being reported in the Scuba table. Reviewed By: nubbel Differential Revision: D22791255 fbshipit-source-id: a4a16c6583974a0423b12805fb8d1a22af44cf5c --- desktop/app/src/init.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/app/src/init.tsx b/desktop/app/src/init.tsx index cef429851..e26ad76d9 100644 --- a/desktop/app/src/init.tsx +++ b/desktop/app/src/init.tsx @@ -46,9 +46,12 @@ if (process.env.NODE_ENV === 'development' && os.platform() === 'darwin') { global.electronRequire('mac-ca'); } +const [s, ns] = process.hrtime(); +const launchTime = s * 1e3 + ns / 1e6; + const logger = initLogger(store); -QuickPerformanceLogger.markerStart(FLIPPER_QPL_EVENTS.STARTUP); +QuickPerformanceLogger.markerStart(FLIPPER_QPL_EVENTS.STARTUP, 0, launchTime); enableMapSet();