Add marker start and end to App to measure the startup time for Flipper (#1398)

Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1398

Pull Request resolved: https://github.com/facebook/flipper/pull/1397

Reviewed By: nubbel

Differential Revision: D22549700

fbshipit-source-id: 7553ba075e45f1a515922012d7db4fdefefcaa24
This commit is contained in:
Nicole Stiliyan Vukadinova
2020-07-23 07:28:22 -07:00
committed by Facebook GitHub Bot
parent 33cd7d29df
commit 7d06571cfa
3 changed files with 68 additions and 0 deletions

View File

@@ -46,6 +46,10 @@ import StatusBar from './chrome/StatusBar';
import SettingsSheet from './chrome/SettingsSheet';
import DoctorSheet from './chrome/DoctorSheet';
import ChangelogSheet, {hasNewChangesToShow} from './chrome/ChangelogSheet';
import QuickPerformanceLogger, {
QuickLogActionType,
FLIPPER_QPL_EVENTS,
} from './fb-stubs/QPL';
const version = remote.app.getVersion();
@@ -88,7 +92,23 @@ export class App extends React.Component<Props> {
'launchTime',
launchEndTime - launchStartTime,
);
QuickPerformanceLogger.markerPoint(
FLIPPER_QPL_EVENTS.STARTUP,
'launchStartTime',
undefined,
0,
launchStartTime,
);
QuickPerformanceLogger.markerEnd(
FLIPPER_QPL_EVENTS.STARTUP,
QuickLogActionType.SUCCESS,
0,
launchEndTime,
);
});
ipcRenderer.send('getLaunchTime');
ipcRenderer.send('componentDidMount');