@codingame/monaco-vscode-performance-service-override 2.2.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-performance-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@3.1.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -3,7 +3,7 @@ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/comm
|
|
|
3
3
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
4
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
5
5
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
6
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
6
|
+
import { registerWorkbenchContribution2, Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
7
7
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
8
8
|
import { PerfviewContrib, PerfviewInput } from './perfviewEditor.js';
|
|
9
9
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
@@ -11,7 +11,7 @@ import { InstantiationService, Trace } from 'vscode/vscode/vs/platform/instantia
|
|
|
11
11
|
import { EventProfiling } from 'vscode/vscode/vs/base/common/event';
|
|
12
12
|
import { InputLatencyContrib } from './inputLatencyContrib.js';
|
|
13
13
|
|
|
14
|
-
(
|
|
14
|
+
registerWorkbenchContribution2(PerfviewContrib.ID, PerfviewContrib, { lazy: true });
|
|
15
15
|
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(PerfviewInput.Id, class {
|
|
16
16
|
canSerialize() {
|
|
17
17
|
return true;
|
|
@@ -38,8 +38,8 @@ registerAction2(class extends Action2 {
|
|
|
38
38
|
}
|
|
39
39
|
run(accessor) {
|
|
40
40
|
const editorService = accessor.get(IEditorService);
|
|
41
|
-
const
|
|
42
|
-
return editorService.openEditor(
|
|
41
|
+
const contrib = PerfviewContrib.get();
|
|
42
|
+
return editorService.openEditor(contrib.getEditorInput(), { pinned: true });
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
registerAction2(class PrintServiceCycles extends Action2 {
|
|
@@ -22,29 +22,43 @@ import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
|
22
22
|
import { IFilesConfigurationService } from 'vscode/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService';
|
|
23
23
|
import { ITerminalService } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminal';
|
|
24
24
|
import { ITextResourceConfigurationService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
|
|
25
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
26
|
+
import { getWorkbenchContribution, Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
25
27
|
|
|
26
|
-
var PerfviewInput_1;
|
|
28
|
+
var PerfviewContrib_1, PerfviewInput_1;
|
|
27
29
|
let PerfviewContrib = class PerfviewContrib {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
static { PerfviewContrib_1 = this; }
|
|
31
|
+
static get() {
|
|
32
|
+
return getWorkbenchContribution(PerfviewContrib_1.ID);
|
|
33
|
+
}
|
|
34
|
+
static { this.ID = 'workbench.contrib.perfview'; }
|
|
35
|
+
constructor(_instaService, textModelResolverService) {
|
|
36
|
+
this._instaService = _instaService;
|
|
37
|
+
this._inputUri = ( URI.from({ scheme: 'perf', path: 'Startup Performance' }));
|
|
38
|
+
this._registration = textModelResolverService.registerTextModelContentProvider('perf', _instaService.createInstance(PerfModelContentProvider));
|
|
30
39
|
}
|
|
31
40
|
dispose() {
|
|
32
41
|
this._registration.dispose();
|
|
33
42
|
}
|
|
43
|
+
getInputUri() {
|
|
44
|
+
return this._inputUri;
|
|
45
|
+
}
|
|
46
|
+
getEditorInput() {
|
|
47
|
+
return this._instaService.createInstance(PerfviewInput);
|
|
48
|
+
}
|
|
34
49
|
};
|
|
35
|
-
PerfviewContrib = ( __decorate([
|
|
50
|
+
PerfviewContrib = PerfviewContrib_1 = ( __decorate([
|
|
36
51
|
( __param(0, IInstantiationService)),
|
|
37
52
|
( __param(1, ITextModelService))
|
|
38
53
|
], PerfviewContrib));
|
|
39
54
|
let PerfviewInput = class PerfviewInput extends TextResourceEditorInput {
|
|
40
55
|
static { PerfviewInput_1 = this; }
|
|
41
56
|
static { this.Id = 'PerfviewInput'; }
|
|
42
|
-
static { this.Uri = ( URI.from({ scheme: 'perf', path: 'Startup Performance' })); }
|
|
43
57
|
get typeId() {
|
|
44
58
|
return PerfviewInput_1.Id;
|
|
45
59
|
}
|
|
46
60
|
constructor(textModelResolverService, textFileService, editorService, fileService, labelService, filesConfigurationService, textResourceConfigurationService) {
|
|
47
|
-
super(
|
|
61
|
+
super(PerfviewContrib.get().getInputUri(), ( localizeWithPath(
|
|
48
62
|
'vs/workbench/contrib/performance/browser/perfviewEditor',
|
|
49
63
|
'name',
|
|
50
64
|
"Startup Performance"
|
|
@@ -104,6 +118,8 @@ let PerfModelContentProvider = class PerfModelContentProvider {
|
|
|
104
118
|
md.blank();
|
|
105
119
|
this._addPerfMarksTable('Terminal Stats', md, this._timerService.getPerformanceMarks().find(e => e[0] === 'renderer')?.[1].filter(e => e.name.startsWith('code/terminal/')));
|
|
106
120
|
md.blank();
|
|
121
|
+
this._addWorkbenchContributionsPerfMarksTable(md);
|
|
122
|
+
md.blank();
|
|
107
123
|
this._addRawPerfMarks(md);
|
|
108
124
|
md.blank();
|
|
109
125
|
this._addResourceTimingStats(md);
|
|
@@ -133,6 +149,7 @@ let PerfModelContentProvider = class PerfModelContentProvider {
|
|
|
133
149
|
}
|
|
134
150
|
_addSummaryTable(md, stats) {
|
|
135
151
|
const metrics = this._timerService.startupMetrics;
|
|
152
|
+
const contribTimings = ( Registry.as(Extensions.Workbench)).timings;
|
|
136
153
|
const table = [];
|
|
137
154
|
table.push(['start => app.isReady', metrics.timers.ellapsedAppReady, '[main]', `initial startup: ${metrics.initialStartup}`]);
|
|
138
155
|
table.push(['nls:start => nls:end', metrics.timers.ellapsedNlsGeneration, '[main]', `initial startup: ${metrics.initialStartup}`]);
|
|
@@ -154,6 +171,7 @@ let PerfModelContentProvider = class PerfModelContentProvider {
|
|
|
154
171
|
table.push(['restore viewlet', metrics.timers.ellapsedViewletRestore, '[renderer]', metrics.viewletId]);
|
|
155
172
|
table.push(['restore panel', metrics.timers.ellapsedPanelRestore, '[renderer]', metrics.panelId]);
|
|
156
173
|
table.push(['restore & resolve visible editors', metrics.timers.ellapsedEditorRestore, '[renderer]', `${metrics.editorIds.length}: ${metrics.editorIds.join(', ')}`]);
|
|
174
|
+
table.push(['create workbench contributions', metrics.timers.ellapsedWorkbenchContributions, '[renderer]', `${(contribTimings.get(1 )?.length ?? 0) + (contribTimings.get(1 )?.length ?? 0)} blocking startup`]);
|
|
157
175
|
table.push(['overall workbench load', metrics.timers.ellapsedWorkbench, '[renderer]', undefined]);
|
|
158
176
|
table.push(['workbench ready', metrics.ellapsed, '[main->renderer]', undefined]);
|
|
159
177
|
table.push(['renderer ready', metrics.timers.ellapsedRenderer, '[renderer]', undefined]);
|
|
@@ -197,9 +215,23 @@ let PerfModelContentProvider = class PerfModelContentProvider {
|
|
|
197
215
|
table.push([name, Math.round(startTime), Math.round(delta), Math.round(total)]);
|
|
198
216
|
lastStartTime = startTime;
|
|
199
217
|
}
|
|
200
|
-
|
|
218
|
+
if (name) {
|
|
219
|
+
md.heading(2, name);
|
|
220
|
+
}
|
|
201
221
|
md.table(['Name', 'Timestamp', 'Delta', 'Total'], table);
|
|
202
222
|
}
|
|
223
|
+
_addWorkbenchContributionsPerfMarksTable(md) {
|
|
224
|
+
md.heading(2, 'Workbench Contributions Blocking Restore');
|
|
225
|
+
const timings = ( Registry.as(Extensions.Workbench)).timings;
|
|
226
|
+
md.li(`Total (LifecyclePhase.Starting): ${timings.get(1 )?.length} (${timings.get(1 )?.reduce((p, c) => p + c[1], 0)}ms)`);
|
|
227
|
+
md.li(`Total (LifecyclePhase.Ready): ${timings.get(2 )?.length} (${timings.get(2 )?.reduce((p, c) => p + c[1], 0)}ms)`);
|
|
228
|
+
md.blank();
|
|
229
|
+
const marks = this._timerService.getPerformanceMarks().find(e => e[0] === 'renderer')?.[1].filter(e => e.name.startsWith('code/willCreateWorkbenchContribution/1') ||
|
|
230
|
+
e.name.startsWith('code/didCreateWorkbenchContribution/1') ||
|
|
231
|
+
e.name.startsWith('code/willCreateWorkbenchContribution/2') ||
|
|
232
|
+
e.name.startsWith('code/didCreateWorkbenchContribution/2'));
|
|
233
|
+
this._addPerfMarksTable(undefined, md, marks);
|
|
234
|
+
}
|
|
203
235
|
_addRawPerfMarks(md) {
|
|
204
236
|
for (const [source, marks] of this._timerService.getPerformanceMarks()) {
|
|
205
237
|
md.heading(2, `Raw Perf Marks: ${source}`);
|