@codingame/monaco-vscode-performance-service-override 4.5.0 → 4.5.2

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/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { default } from './performance.js';
1
+ export { default } from 'vscode/service-override/performance';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-performance-service-override",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@4.5.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@4.5.2"
30
30
  }
31
31
  }
@@ -11,8 +11,9 @@ 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
+ const _moduleId = "vs/workbench/contrib/performance/browser/performance.contribution";
14
15
  registerWorkbenchContribution2(PerfviewContrib.ID, PerfviewContrib, { lazy: true });
15
- ( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(PerfviewInput.Id, class {
16
+ ( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(PerfviewInput.Id, class {
16
17
  canSerialize() {
17
18
  return true;
18
19
  }
@@ -27,11 +28,7 @@ registerAction2(class extends Action2 {
27
28
  constructor() {
28
29
  super({
29
30
  id: 'perfview.show',
30
- title: ( localize2WithPath(
31
- 'vs/workbench/contrib/performance/browser/performance.contribution',
32
- 'show.label',
33
- 'Startup Performance'
34
- )),
31
+ title: ( localize2WithPath(_moduleId, 0, 'Startup Performance')),
35
32
  category: Categories.Developer,
36
33
  f1: true
37
34
  });
@@ -46,11 +43,7 @@ registerAction2(class PrintServiceCycles extends Action2 {
46
43
  constructor() {
47
44
  super({
48
45
  id: 'perf.insta.printAsyncCycles',
49
- title: ( localize2WithPath(
50
- 'vs/workbench/contrib/performance/browser/performance.contribution',
51
- 'cycles',
52
- 'Print Service Cycles'
53
- )),
46
+ title: ( localize2WithPath(_moduleId, 1, 'Print Service Cycles')),
54
47
  category: Categories.Developer,
55
48
  f1: true
56
49
  });
@@ -72,11 +65,7 @@ registerAction2(class PrintServiceTraces extends Action2 {
72
65
  constructor() {
73
66
  super({
74
67
  id: 'perf.insta.printTraces',
75
- title: ( localize2WithPath(
76
- 'vs/workbench/contrib/performance/browser/performance.contribution',
77
- 'insta.trace',
78
- 'Print Service Traces'
79
- )),
68
+ title: ( localize2WithPath(_moduleId, 2, 'Print Service Traces')),
80
69
  category: Categories.Developer,
81
70
  f1: true
82
71
  });
@@ -95,11 +84,7 @@ registerAction2(class PrintEventProfiling extends Action2 {
95
84
  constructor() {
96
85
  super({
97
86
  id: 'perf.event.profiling',
98
- title: ( localize2WithPath(
99
- 'vs/workbench/contrib/performance/browser/performance.contribution',
100
- 'emitter',
101
- 'Print Emitter Profiles'
102
- )),
87
+ title: ( localize2WithPath(_moduleId, 3, 'Print Emitter Profiles')),
103
88
  category: Categories.Developer,
104
89
  f1: true
105
90
  });
@@ -114,4 +99,4 @@ registerAction2(class PrintEventProfiling extends Action2 {
114
99
  }
115
100
  }
116
101
  });
117
- ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(InputLatencyContrib, 4 );
102
+ ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(InputLatencyContrib, 4 );
@@ -29,6 +29,7 @@ import { getWorkbenchContribution, Extensions } from 'vscode/vscode/vs/workbench
29
29
  import { ICustomEditorLabelService } from 'vscode/vscode/vs/workbench/services/editor/common/customEditorLabelService.service';
30
30
 
31
31
  var PerfviewContrib_1, PerfviewInput_1;
32
+ const _moduleId = "vs/workbench/contrib/performance/browser/perfviewEditor";
32
33
  let PerfviewContrib = class PerfviewContrib {
33
34
  static { PerfviewContrib_1 = this; }
34
35
  static get() {
@@ -37,7 +38,7 @@ let PerfviewContrib = class PerfviewContrib {
37
38
  static { this.ID = 'workbench.contrib.perfview'; }
38
39
  constructor(_instaService, textModelResolverService) {
39
40
  this._instaService = _instaService;
40
- this._inputUri = ( URI.from({ scheme: 'perf', path: 'Startup Performance' }));
41
+ this._inputUri = ( (URI.from({ scheme: 'perf', path: 'Startup Performance' })));
41
42
  this._registration = textModelResolverService.registerTextModelContentProvider('perf', _instaService.createInstance(PerfModelContentProvider));
42
43
  }
43
44
  dispose() {
@@ -50,10 +51,10 @@ let PerfviewContrib = class PerfviewContrib {
50
51
  return this._instaService.createInstance(PerfviewInput);
51
52
  }
52
53
  };
53
- PerfviewContrib = PerfviewContrib_1 = ( __decorate([
54
- ( __param(0, IInstantiationService)),
55
- ( __param(1, ITextModelService))
56
- ], PerfviewContrib));
54
+ PerfviewContrib = PerfviewContrib_1 = ( (__decorate([
55
+ ( (__param(0, IInstantiationService))),
56
+ ( (__param(1, ITextModelService)))
57
+ ], PerfviewContrib)));
57
58
  let PerfviewInput = class PerfviewInput extends TextResourceEditorInput {
58
59
  static { PerfviewInput_1 = this; }
59
60
  static { this.Id = 'PerfviewInput'; }
@@ -61,23 +62,19 @@ let PerfviewInput = class PerfviewInput extends TextResourceEditorInput {
61
62
  return PerfviewInput_1.Id;
62
63
  }
63
64
  constructor(textModelResolverService, textFileService, editorService, fileService, labelService, filesConfigurationService, textResourceConfigurationService, customEditorLabelService) {
64
- super(PerfviewContrib.get().getInputUri(), ( localizeWithPath(
65
- 'vs/workbench/contrib/performance/browser/perfviewEditor',
66
- 'name',
67
- "Startup Performance"
68
- )), undefined, undefined, undefined, textModelResolverService, textFileService, editorService, fileService, labelService, filesConfigurationService, textResourceConfigurationService, customEditorLabelService);
65
+ super(PerfviewContrib.get().getInputUri(), ( localizeWithPath(_moduleId, 0, "Startup Performance")), undefined, undefined, undefined, textModelResolverService, textFileService, editorService, fileService, labelService, filesConfigurationService, textResourceConfigurationService, customEditorLabelService);
69
66
  }
70
67
  };
71
- PerfviewInput = PerfviewInput_1 = ( __decorate([
72
- ( __param(0, ITextModelService)),
73
- ( __param(1, ITextFileService)),
74
- ( __param(2, IEditorService)),
75
- ( __param(3, IFileService)),
76
- ( __param(4, ILabelService)),
77
- ( __param(5, IFilesConfigurationService)),
78
- ( __param(6, ITextResourceConfigurationService)),
79
- ( __param(7, ICustomEditorLabelService))
80
- ], PerfviewInput));
68
+ PerfviewInput = PerfviewInput_1 = ( (__decorate([
69
+ ( (__param(0, ITextModelService))),
70
+ ( (__param(1, ITextFileService))),
71
+ ( (__param(2, IEditorService))),
72
+ ( (__param(3, IFileService))),
73
+ ( (__param(4, ILabelService))),
74
+ ( (__param(5, IFilesConfigurationService))),
75
+ ( (__param(6, ITextResourceConfigurationService))),
76
+ ( (__param(7, ICustomEditorLabelService)))
77
+ ], PerfviewInput)));
81
78
  let PerfModelContentProvider = class PerfModelContentProvider {
82
79
  constructor(_modelService, _languageService, _editorService, _lifecycleService, _timerService, _extensionService, _productService, _terminalService) {
83
80
  this._modelService = _modelService;
@@ -113,7 +110,7 @@ let PerfModelContentProvider = class PerfModelContentProvider {
113
110
  ]).then(() => {
114
111
  if (this._model && !this._model.isDisposed()) {
115
112
  const stats = LoaderStats.get();
116
- const md = ( new MarkdownBuilder());
113
+ const md = ( (new MarkdownBuilder()));
117
114
  this._addSummary(md);
118
115
  md.blank();
119
116
  this._addSummaryTable(md, stats);
@@ -153,7 +150,7 @@ let PerfModelContentProvider = class PerfModelContentProvider {
153
150
  }
154
151
  _addSummaryTable(md, stats) {
155
152
  const metrics = this._timerService.startupMetrics;
156
- const contribTimings = ( Registry.as(Extensions.Workbench)).timings;
153
+ const contribTimings = ( (Registry.as(Extensions.Workbench))).timings;
157
154
  const table = [];
158
155
  table.push(['start => app.isReady', metrics.timers.ellapsedAppReady, '[main]', `initial startup: ${metrics.initialStartup}`]);
159
156
  table.push(['nls:start => nls:end', metrics.timers.ellapsedNlsGeneration, '[main]', `initial startup: ${metrics.initialStartup}`]);
@@ -226,7 +223,7 @@ let PerfModelContentProvider = class PerfModelContentProvider {
226
223
  }
227
224
  _addWorkbenchContributionsPerfMarksTable(md) {
228
225
  md.heading(2, 'Workbench Contributions Blocking Restore');
229
- const timings = ( Registry.as(Extensions.Workbench)).timings;
226
+ const timings = ( (Registry.as(Extensions.Workbench))).timings;
230
227
  md.li(`Total (LifecyclePhase.Starting): ${timings.get(1 )?.length} (${timings.get(1 )?.reduce((p, c) => p + c[1], 0)}ms)`);
231
228
  md.li(`Total (LifecyclePhase.Ready): ${timings.get(2 )?.length} (${timings.get(2 )?.reduce((p, c) => p + c[1], 0)}ms)`);
232
229
  md.blank();
@@ -267,14 +264,14 @@ let PerfModelContentProvider = class PerfModelContentProvider {
267
264
  md.table(['Module', 'Duration'], stats.nodeEval);
268
265
  }
269
266
  _addCachedDataStats(md) {
270
- const map = ( new Map());
267
+ const map = ( (new Map()));
271
268
  map.set(63 , []);
272
269
  map.set(60 , []);
273
270
  map.set(61 , []);
274
271
  map.set(62 , []);
275
272
  if (typeof require.getStats === 'function') {
276
273
  for (const stat of require.getStats()) {
277
- if (( map.has(stat.type))) {
274
+ if (( (map.has(stat.type)))) {
278
275
  map.get(stat.type).push(stat.detail);
279
276
  }
280
277
  }
@@ -300,9 +297,9 @@ let PerfModelContentProvider = class PerfModelContentProvider {
300
297
  printLists(map.get(63 ));
301
298
  }
302
299
  _addResourceTimingStats(md) {
303
- const stats = ( performance.getEntriesByType('resource').map(entry => {
300
+ const stats = ( (performance.getEntriesByType('resource').map(entry => {
304
301
  return [entry.name, entry.duration];
305
- }));
302
+ })));
306
303
  if (!stats.length) {
307
304
  return;
308
305
  }
@@ -310,16 +307,16 @@ let PerfModelContentProvider = class PerfModelContentProvider {
310
307
  md.table(['Name', 'Duration'], stats);
311
308
  }
312
309
  };
313
- PerfModelContentProvider = ( __decorate([
314
- ( __param(0, IModelService)),
315
- ( __param(1, ILanguageService)),
316
- ( __param(2, ICodeEditorService)),
317
- ( __param(3, ILifecycleService)),
318
- ( __param(4, ITimerService)),
319
- ( __param(5, IExtensionService)),
320
- ( __param(6, IProductService)),
321
- ( __param(7, ITerminalService))
322
- ], PerfModelContentProvider));
310
+ PerfModelContentProvider = ( (__decorate([
311
+ ( (__param(0, IModelService))),
312
+ ( (__param(1, ILanguageService))),
313
+ ( (__param(2, ICodeEditorService))),
314
+ ( (__param(3, ILifecycleService))),
315
+ ( (__param(4, ITimerService))),
316
+ ( (__param(5, IExtensionService))),
317
+ ( (__param(6, IProductService))),
318
+ ( (__param(7, ITerminalService)))
319
+ ], PerfModelContentProvider)));
323
320
  class MarkdownBuilder {
324
321
  constructor() {
325
322
  this.value = '';
package/performance.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { IEditorOverrideServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
2
-
3
- declare function getServiceOverride(): IEditorOverrideServices;
4
-
5
- export { getServiceOverride as default };