perf - track ellapsedWorkbenchContributions

This commit is contained in:
Benjamin Pasero 2024-02-01 06:00:00 +01:00 committed by Benjamin Pasero
parent 8182fd55db
commit 3969ef5b50
2 changed files with 13 additions and 0 deletions

View file

@ -215,6 +215,7 @@ class PerfModelContentProvider implements ITextModelContentProvider {
table.push(['restore viewlet', metrics.timers.ellapsedViewletRestore, '[renderer]', metrics.viewletId]);
table.push(['restore panel', metrics.timers.ellapsedPanelRestore, '[renderer]', metrics.panelId]);
table.push(['restore & resolve visible editors', metrics.timers.ellapsedEditorRestore, '[renderer]', `${metrics.editorIds.length}: ${metrics.editorIds.join(', ')}`]);
table.push(['create workbench contributions', metrics.timers.ellapsedWorkbenchContributions, '[renderer]']);
table.push(['overall workbench load', metrics.timers.ellapsedWorkbench, '[renderer]', undefined]);
table.push(['workbench ready', metrics.ellapsed, '[main->renderer]', undefined]);
table.push(['renderer ready', metrics.timers.ellapsedRenderer, '[renderer]', undefined]);

View file

@ -66,6 +66,7 @@ export interface IMemoryInfo {
"timers.ellapsedViewletRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedPanelRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedEditorRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWorkbenchContributions" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWorkbench" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"platform" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"release" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
@ -364,6 +365,16 @@ export interface IStartupMetrics {
*/
readonly ellapsedEditorRestore: number;
/**
* The time it took to create all workbench contributions on the starting and ready
* lifecycle phase, thus blocking `ellapsedWorkbench`.
*
* * Happens in the renderer-process
* * Measured with the `willCreateWorkbenchContributions/1` and `didCreateWorkbenchContributions/2` performance marks.
*
*/
readonly ellapsedWorkbenchContributions: number;
/**
* The time it took to create the workbench.
*
@ -686,6 +697,7 @@ export abstract class AbstractTimerService implements ITimerService {
ellapsedEditorRestore: this._marks.getDuration('code/willRestoreEditors', 'code/didRestoreEditors'),
ellapsedViewletRestore: this._marks.getDuration('code/willRestoreViewlet', 'code/didRestoreViewlet'),
ellapsedPanelRestore: this._marks.getDuration('code/willRestorePanel', 'code/didRestorePanel'),
ellapsedWorkbenchContributions: this._marks.getDuration('code/willCreateWorkbenchContributions/1', 'code/didCreateWorkbenchContributions/2'),
ellapsedWorkbench: this._marks.getDuration('code/willStartWorkbench', 'code/didStartWorkbench'),
ellapsedExtensionsReady: this._marks.getDuration(startMark, 'code/didLoadExtensions'),
ellapsedRenderer: this._marks.getDuration('code/didStartRenderer', 'code/didStartWorkbench')