simplified perf-tracker

This commit is contained in:
antelle 2021-01-07 20:54:00 +01:00
parent 74bd270423
commit 4f96629e22
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
let perfTimestamps = [{ name: 'pre-init', ts: process.hrtime() }];
const electron = require('electron');
const path = require('path');
const fs = require('fs');
const url = require('url');
let perfTimestamps = global.perfTimestamps;
perfTimestamps?.push({ name: 'loading app requires', ts: process.hrtime() });
const main = electron.app;
@ -748,7 +748,7 @@ function reportStartProfile() {
})
.slice(1);
perfTimestamps = global.perfTimestamps = undefined;
perfTimestamps = undefined;
const startProfile = { totalTime, timings };
emitRemoteEvent('start-profile', startProfile);