Skip to content

Commit 3969ef5

Browse files
committed
perf - track ellapsedWorkbenchContributions
1 parent 8182fd5 commit 3969ef5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/vs/workbench/contrib/performance/browser/perfviewEditor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ class PerfModelContentProvider implements ITextModelContentProvider {
215215
table.push(['restore viewlet', metrics.timers.ellapsedViewletRestore, '[renderer]', metrics.viewletId]);
216216
table.push(['restore panel', metrics.timers.ellapsedPanelRestore, '[renderer]', metrics.panelId]);
217217
table.push(['restore & resolve visible editors', metrics.timers.ellapsedEditorRestore, '[renderer]', `${metrics.editorIds.length}: ${metrics.editorIds.join(', ')}`]);
218+
table.push(['create workbench contributions', metrics.timers.ellapsedWorkbenchContributions, '[renderer]']);
218219
table.push(['overall workbench load', metrics.timers.ellapsedWorkbench, '[renderer]', undefined]);
219220
table.push(['workbench ready', metrics.ellapsed, '[main->renderer]', undefined]);
220221
table.push(['renderer ready', metrics.timers.ellapsedRenderer, '[renderer]', undefined]);

src/vs/workbench/services/timer/browser/timerService.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export interface IMemoryInfo {
6666
"timers.ellapsedViewletRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
6767
"timers.ellapsedPanelRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
6868
"timers.ellapsedEditorRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
69+
"timers.ellapsedWorkbenchContributions" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
6970
"timers.ellapsedWorkbench" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
7071
"platform" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
7172
"release" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
@@ -364,6 +365,16 @@ export interface IStartupMetrics {
364365
*/
365366
readonly ellapsedEditorRestore: number;
366367

368+
/**
369+
* The time it took to create all workbench contributions on the starting and ready
370+
* lifecycle phase, thus blocking `ellapsedWorkbench`.
371+
*
372+
* * Happens in the renderer-process
373+
* * Measured with the `willCreateWorkbenchContributions/1` and `didCreateWorkbenchContributions/2` performance marks.
374+
*
375+
*/
376+
readonly ellapsedWorkbenchContributions: number;
377+
367378
/**
368379
* The time it took to create the workbench.
369380
*
@@ -686,6 +697,7 @@ export abstract class AbstractTimerService implements ITimerService {
686697
ellapsedEditorRestore: this._marks.getDuration('code/willRestoreEditors', 'code/didRestoreEditors'),
687698
ellapsedViewletRestore: this._marks.getDuration('code/willRestoreViewlet', 'code/didRestoreViewlet'),
688699
ellapsedPanelRestore: this._marks.getDuration('code/willRestorePanel', 'code/didRestorePanel'),
700+
ellapsedWorkbenchContributions: this._marks.getDuration('code/willCreateWorkbenchContributions/1', 'code/didCreateWorkbenchContributions/2'),
689701
ellapsedWorkbench: this._marks.getDuration('code/willStartWorkbench', 'code/didStartWorkbench'),
690702
ellapsedExtensionsReady: this._marks.getDuration(startMark, 'code/didLoadExtensions'),
691703
ellapsedRenderer: this._marks.getDuration('code/didStartRenderer', 'code/didStartWorkbench')

0 commit comments

Comments
 (0)