rename startupTimer to performance, support mark and measure, drop promise support, add more marks to slowly phase out old timers

This commit is contained in:
Johannes Rieken
2017-11-06 18:50:57 +01:00
parent 10fe0ac994
commit b289f0c5e2
12 changed files with 157 additions and 190 deletions
+4 -1
View File
@@ -26,6 +26,7 @@ import { ICodeWindow } from 'vs/platform/windows/electron-main/windows';
import { IWorkspaceIdentifier, IWorkspacesMainService } from 'vs/platform/workspaces/common/workspaces';
import { IBackupMainService } from 'vs/platform/backup/common/backup';
import { ICommandAction } from 'vs/platform/actions/common/actions';
import { mark, getEntries } from 'vs/base/common/performance';
export interface IWindowState {
width?: number;
@@ -507,6 +508,7 @@ export class CodeWindow implements ICodeWindow {
}
// Load URL
mark('main:loadWindow');
this._win.loadURL(this.getUrl(config));
// Make window visible if it did not open in N seconds because this indicates an error
@@ -578,6 +580,7 @@ export class CodeWindow implements ICodeWindow {
windowConfiguration.backgroundColor = this.getBackgroundColor();
// Perf Counters
windowConfiguration.perfEntries = getEntries();
windowConfiguration.perfStartTime = global.perfStartTime;
windowConfiguration.perfAppReady = global.perfAppReady;
windowConfiguration.perfWindowLoadTime = Date.now();
@@ -971,4 +974,4 @@ export class CodeWindow implements ICodeWindow {
this._win = null; // Important to dereference the window object to allow for GC
}
}
}