measure clean versus unclean exits

Summary:
This adds another field to the exit data to record whether we had a clean exit where the app was closed as it should.

Note that doing a reload inside Flipper will be recorded as an unclean exit.

Reviewed By: passy

Differential Revision: D20915481

fbshipit-source-id: 240192d7a69bf620bfaa316e3e5cb0f45d6a34cc
This commit is contained in:
Michel Weststrate
2020-04-08 06:24:51 -07:00
committed by Facebook GitHub Bot
parent 41a911379d
commit 220052d70d
2 changed files with 35 additions and 9 deletions

View File

@@ -310,7 +310,7 @@ function tryCreateWindow() {
});
win.once('ready-to-show', () => win.show());
win.once('close', () => {
win.webContents.send('trackUsage');
win.webContents.send('trackUsage', 'exit');
if (process.env.NODE_ENV === 'development') {
// Removes as a default protocol for debug builds. Because even when the
// production application is installed, and one tries to deeplink through