debt - remove appReady from timerService, use perf-marks
This commit is contained in:
parent
09f3da07b8
commit
c219c3f733
|
@ -219,7 +219,6 @@ var nodeCachedDataDir = getNodeCachedDataDir().then(function (value) {
|
|||
// Load our code once ready
|
||||
app.once('ready', function () {
|
||||
perf.mark('main:appReady');
|
||||
global.perfAppReady = Date.now();
|
||||
var nlsConfig = getNLSConfiguration();
|
||||
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
|
||||
|
||||
|
|
|
@ -587,7 +587,6 @@ export class CodeWindow implements ICodeWindow {
|
|||
// Perf Counters
|
||||
windowConfiguration.perfEntries = exportEntries();
|
||||
windowConfiguration.perfStartTime = global.perfStartTime;
|
||||
windowConfiguration.perfAppReady = global.perfAppReady;
|
||||
windowConfiguration.perfWindowLoadTime = Date.now();
|
||||
|
||||
// Config (combination of process.argv and window configuration)
|
||||
|
|
|
@ -175,7 +175,6 @@ function main() {
|
|||
isInitialStartup: !!configuration.isInitialStartup,
|
||||
hasAccessibilitySupport: !!configuration.accessibilitySupport,
|
||||
start: configuration.perfStartTime,
|
||||
appReady: configuration.perfAppReady,
|
||||
windowLoad: configuration.perfWindowLoadTime
|
||||
};
|
||||
|
||||
|
|
|
@ -83,11 +83,7 @@ export interface IStartupMetrics {
|
|||
|
||||
export interface IInitData {
|
||||
start: number;
|
||||
|
||||
appReady: number;
|
||||
|
||||
windowLoad: number;
|
||||
|
||||
isInitialStartup: boolean;
|
||||
hasAccessibilitySupport: boolean;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ export class TimerService implements ITimerService {
|
|||
public _serviceBrand: any;
|
||||
|
||||
public readonly start: number;
|
||||
public readonly appReady: number;
|
||||
public readonly windowLoad: number;
|
||||
|
||||
public readonly isInitialStartup: boolean;
|
||||
|
@ -24,7 +23,6 @@ export class TimerService implements ITimerService {
|
|||
|
||||
constructor(initData: IInitData, private isEmptyWorkbench: boolean) {
|
||||
this.start = initData.start;
|
||||
this.appReady = initData.appReady;
|
||||
this.windowLoad = initData.windowLoad;
|
||||
|
||||
this.isInitialStartup = initData.isInitialStartup;
|
||||
|
@ -100,8 +98,8 @@ export class TimerService implements ITimerService {
|
|||
};
|
||||
|
||||
if (initialStartup) {
|
||||
this._startupMetrics.timers.ellapsedAppReady = this.appReady - this.start;
|
||||
this._startupMetrics.timers.ellapsedWindowLoad = this.windowLoad - this.appReady;
|
||||
this._startupMetrics.timers.ellapsedAppReady = perf.getDuration('main:started', 'main:appReady');
|
||||
this._startupMetrics.timers.ellapsedWindowLoad = this.windowLoad - perf.getEntry('mark', 'main:appReady').startTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue