Log app startup time
This commit is contained in:
parent
8a72607fa7
commit
bba50c8427
4 changed files with 12 additions and 1 deletions
8
main.js
8
main.js
|
@ -866,6 +866,14 @@ function showPermissionsPopupWindow(forCalling, forCamera) {
|
|||
// Some APIs can only be used after this event occurs.
|
||||
let ready = false;
|
||||
app.on('ready', async () => {
|
||||
const startTime = Date.now();
|
||||
|
||||
// We use this event only a single time to log the startup time of the app
|
||||
// from when it's first ready until the loading screen disappears.
|
||||
ipc.once('signal-app-loaded', () => {
|
||||
console.log('App has finished loading in:', Date.now() - startTime);
|
||||
});
|
||||
|
||||
const userDataPath = await getRealPath(app.getPath('userData'));
|
||||
const installPath = await getRealPath(app.getAppPath());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue