@theia/plugin-metrics 1.77.0-next.95 → 1.77.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/lib/browser/plugin-metrics-creator.d.ts +1 -1
- package/lib/browser/plugin-metrics-creator.d.ts.map +1 -1
- package/lib/browser/plugin-metrics-creator.js +12 -17
- package/lib/browser/plugin-metrics-creator.js.map +1 -1
- package/lib/browser/plugin-metrics-frontend-module.js +17 -19
- package/lib/browser/plugin-metrics-frontend-module.js.map +1 -1
- package/lib/browser/plugin-metrics-languages-main.js +11 -15
- package/lib/browser/plugin-metrics-languages-main.js.map +1 -1
- package/lib/browser/plugin-metrics-output-registry.d.ts +1 -1
- package/lib/browser/plugin-metrics-output-registry.d.ts.map +1 -1
- package/lib/browser/plugin-metrics-output-registry.js +12 -16
- package/lib/browser/plugin-metrics-output-registry.js.map +1 -1
- package/lib/browser/plugin-metrics-resolver.js +10 -14
- package/lib/browser/plugin-metrics-resolver.js.map +1 -1
- package/lib/browser-only/browser-only-plugin-metrics.d.ts +1 -1
- package/lib/browser-only/browser-only-plugin-metrics.d.ts.map +1 -1
- package/lib/browser-only/browser-only-plugin-metrics.js +5 -8
- package/lib/browser-only/browser-only-plugin-metrics.js.map +1 -1
- package/lib/browser-only/browser-only-plugin-metrics.spec.js +15 -18
- package/lib/browser-only/browser-only-plugin-metrics.spec.js.map +1 -1
- package/lib/browser-only/plugin-metrics-frontend-only-module.js +8 -10
- package/lib/browser-only/plugin-metrics-frontend-only-module.js.map +1 -1
- package/lib/common/metrics-protocol.js +3 -6
- package/lib/common/metrics-protocol.js.map +1 -1
- package/lib/common/plugin-metrics-types.js +3 -8
- package/lib/common/plugin-metrics-types.js.map +1 -1
- package/lib/node/metric-output/plugin-metrics-time-count.d.ts +1 -1
- package/lib/node/metric-output/plugin-metrics-time-count.d.ts.map +1 -1
- package/lib/node/metric-output/plugin-metrics-time-count.js +5 -8
- package/lib/node/metric-output/plugin-metrics-time-count.js.map +1 -1
- package/lib/node/metric-output/plugin-metrics-time-sum.d.ts +1 -1
- package/lib/node/metric-output/plugin-metrics-time-sum.d.ts.map +1 -1
- package/lib/node/metric-output/plugin-metrics-time-sum.js +5 -8
- package/lib/node/metric-output/plugin-metrics-time-sum.js.map +1 -1
- package/lib/node/metric-string-generator.d.ts +1 -1
- package/lib/node/metric-string-generator.d.ts.map +1 -1
- package/lib/node/metric-string-generator.js +11 -16
- package/lib/node/metric-string-generator.js.map +1 -1
- package/lib/node/metrics-contributor.d.ts +2 -2
- package/lib/node/metrics-contributor.d.ts.map +1 -1
- package/lib/node/metrics-contributor.js +5 -8
- package/lib/node/metrics-contributor.js.map +1 -1
- package/lib/node/metrics-contributor.spec.js +23 -26
- package/lib/node/metrics-contributor.spec.js.map +1 -1
- package/lib/node/plugin-metrics-backend-module.js +22 -24
- package/lib/node/plugin-metrics-backend-module.js.map +1 -1
- package/lib/node/plugin-metrics-impl.d.ts +1 -1
- package/lib/node/plugin-metrics-impl.d.ts.map +1 -1
- package/lib/node/plugin-metrics-impl.js +5 -8
- package/lib/node/plugin-metrics-impl.js.map +1 -1
- package/lib/node/plugin-metrics.d.ts +2 -2
- package/lib/node/plugin-metrics.d.ts.map +1 -1
- package/lib/node/plugin-metrics.js +13 -18
- package/lib/node/plugin-metrics.js.map +1 -1
- package/lib/node/plugin-metrics.spec.js +14 -17
- package/lib/node/plugin-metrics.spec.js.map +1 -1
- package/package.json +15 -7
- package/src/browser/plugin-metrics-creator.ts +2 -2
- package/src/browser/plugin-metrics-frontend-module.ts +5 -5
- package/src/browser/plugin-metrics-languages-main.ts +1 -1
- package/src/browser/plugin-metrics-output-registry.ts +2 -2
- package/src/browser/plugin-metrics-resolver.ts +2 -2
- package/src/browser-only/browser-only-plugin-metrics.spec.ts +3 -3
- package/src/browser-only/browser-only-plugin-metrics.ts +1 -1
- package/src/browser-only/plugin-metrics-frontend-only-module.ts +2 -2
- package/src/node/metric-output/plugin-metrics-time-count.ts +1 -1
- package/src/node/metric-output/plugin-metrics-time-sum.ts +1 -1
- package/src/node/metric-string-generator.ts +3 -3
- package/src/node/metrics-contributor.spec.ts +4 -4
- package/src/node/metrics-contributor.ts +2 -2
- package/src/node/plugin-metrics-backend-module.ts +7 -7
- package/src/node/plugin-metrics-impl.ts +1 -1
- package/src/node/plugin-metrics.spec.ts +4 -4
- package/src/node/plugin-metrics.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-metrics.js","sourceRoot":"","sources":["../../src/node/plugin-metrics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-metrics.js","sourceRoot":"","sources":["../../src/node/plugin-metrics.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAGpE,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAA/B;QAQK,YAAO,GAAG,EAAE,CAAC;IAYzB,CAAC;IAVG,UAAU;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,eAAe;QACX,WAAW,CAAC,GAAG,EAAE;YACb,MAAM,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,CAAC;YAC9D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;QAC5E,CAAC,EAAE,eAAe,CAAC,CAAC;IACxB,CAAC;CACJ,CAAA;AAjBsB;IADlB,MAAM,CAAC,wBAAwB,CAAC;qEAC+B;AAG7C;IADlB,MAAM,CAAC,2BAA2B,CAAC;kEAC4B;AANvD,yBAAyB;IADrC,UAAU,EAAE;GACA,yBAAyB,CAoBrC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2026 Sahil Gupta and others.
|
|
4
3
|
//
|
|
@@ -14,15 +13,13 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const assert = tslib_1.__importStar(require("assert"));
|
|
25
|
-
const sinon = tslib_1.__importStar(require("sinon"));
|
|
16
|
+
import { Container, ContainerModule } from '@theia/core/shared/inversify';
|
|
17
|
+
import { PluginMetricsContribution } from './plugin-metrics.js';
|
|
18
|
+
import { PluginMetricsContributor } from './metrics-contributor.js';
|
|
19
|
+
import { PluginMetricStringGenerator } from './metric-string-generator.js';
|
|
20
|
+
import { METRICS_TIMEOUT } from '../common/metrics-protocol.js';
|
|
21
|
+
import * as assert from 'assert';
|
|
22
|
+
import * as sinon from 'sinon';
|
|
26
23
|
const COLLECTED_METRICS = 'test_metric 42\n';
|
|
27
24
|
describe('PluginMetricsContribution:', () => {
|
|
28
25
|
let testContainer;
|
|
@@ -30,7 +27,7 @@ describe('PluginMetricsContribution:', () => {
|
|
|
30
27
|
let clock;
|
|
31
28
|
beforeEach(() => {
|
|
32
29
|
clock = sinon.useFakeTimers();
|
|
33
|
-
testContainer = new
|
|
30
|
+
testContainer = new Container();
|
|
34
31
|
// Stub dependencies
|
|
35
32
|
const stubContributor = {
|
|
36
33
|
reconcile: () => ({})
|
|
@@ -38,13 +35,13 @@ describe('PluginMetricsContribution:', () => {
|
|
|
38
35
|
const stubGenerator = {
|
|
39
36
|
getMetricsString: () => COLLECTED_METRICS
|
|
40
37
|
};
|
|
41
|
-
const module = new
|
|
42
|
-
bind(
|
|
43
|
-
bind(
|
|
44
|
-
bind(
|
|
38
|
+
const module = new ContainerModule(bind => {
|
|
39
|
+
bind(PluginMetricsContributor).toConstantValue(stubContributor);
|
|
40
|
+
bind(PluginMetricStringGenerator).toConstantValue(stubGenerator);
|
|
41
|
+
bind(PluginMetricsContribution).toSelf().inSingletonScope();
|
|
45
42
|
});
|
|
46
43
|
testContainer.load(module);
|
|
47
|
-
contribution = testContainer.get(
|
|
44
|
+
contribution = testContainer.get(PluginMetricsContribution);
|
|
48
45
|
});
|
|
49
46
|
afterEach(() => {
|
|
50
47
|
clock.restore();
|
|
@@ -61,7 +58,7 @@ describe('PluginMetricsContribution:', () => {
|
|
|
61
58
|
contribution.startCollecting();
|
|
62
59
|
// The interval has not yet fired, so nothing has been collected
|
|
63
60
|
assert.strictEqual(contribution.getMetrics(), '');
|
|
64
|
-
clock.tick(
|
|
61
|
+
clock.tick(METRICS_TIMEOUT);
|
|
65
62
|
// The interval has fired, so the generated metrics string is returned
|
|
66
63
|
assert.strictEqual(contribution.getMetrics(), COLLECTED_METRICS);
|
|
67
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-metrics.spec.js","sourceRoot":"","sources":["../../src/node/plugin-metrics.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-metrics.spec.js","sourceRoot":"","sources":["../../src/node/plugin-metrics.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,6CAA6C;AAC7C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAE7C,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,IAAI,aAAwB,CAAC;IAC7B,IAAI,YAAuC,CAAC;IAC5C,IAAI,KAA4B,CAAC;IAEjC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,aAAa,GAAG,IAAI,SAAS,EAAE,CAAC;QAEhC,oBAAoB;QACpB,MAAM,eAAe,GAAsC;YACvD,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;SACxB,CAAC;QACF,MAAM,aAAa,GAAyC;YACxD,gBAAgB,EAAE,GAAG,EAAE,CAAC,iBAAiB;SAC5C,CAAC;QAEF,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE;YACtC,IAAI,CAAC,wBAAwB,CAAC,CAAC,eAAe,CAAC,eAAsD,CAAC,CAAC;YACvG,IAAI,CAAC,2BAA2B,CAAC,CAAC,eAAe,CAAC,aAAuD,CAAC,CAAC;YAC3G,IAAI,CAAC,yBAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;QAChE,CAAC,CAAC,CAAC;QAEH,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,YAAY,GAAG,aAAa,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,6EAA6E,EAAE,GAAG,EAAE;YACnF,uEAAuE;YACvE,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;YAE1C,iDAAiD;YACjD,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAChC,MAAM,CAAC,WAAW,CAAC,OAAO,OAAO,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,8EAA8E,EAAE,GAAG,EAAE;YACpF,YAAY,CAAC,eAAe,EAAE,CAAC;YAE/B,gEAAgE;YAChE,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;YAElD,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAE5B,sEAAsE;YACtE,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,iBAAiB,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-metrics",
|
|
3
|
-
"version": "1.77.0
|
|
3
|
+
"version": "1.77.0",
|
|
4
4
|
"description": "Theia - Plugin Metrics",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.77.0
|
|
7
|
-
"@theia/metrics": "1.77.0
|
|
7
|
+
"@theia/core": "1.77.0",
|
|
8
|
+
"@theia/metrics": "1.77.0",
|
|
8
9
|
"@theia/monaco-editor-core": "1.108.201",
|
|
9
|
-
"@theia/plugin": "1.77.0
|
|
10
|
-
"@theia/plugin-ext": "1.77.0
|
|
10
|
+
"@theia/plugin": "1.77.0",
|
|
11
|
+
"@theia/plugin-ext": "1.77.0",
|
|
11
12
|
"tslib": "^2.8.1"
|
|
12
13
|
},
|
|
13
14
|
"publishConfig": {
|
|
@@ -45,10 +46,17 @@
|
|
|
45
46
|
"watch": "theiaext watch"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@theia/ext-scripts": "1.
|
|
49
|
+
"@theia/ext-scripts": "1.77.0"
|
|
49
50
|
},
|
|
50
51
|
"nyc": {
|
|
51
52
|
"extends": "../../configs/nyc.json"
|
|
52
53
|
},
|
|
53
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "9c6d81590b559ee8a78a7808203674f3127411f1",
|
|
55
|
+
"exports": {
|
|
56
|
+
"./package.json": "./package.json",
|
|
57
|
+
"./lib/*.json": "./lib/*.json",
|
|
58
|
+
"./lib/*.js": "./lib/*.js",
|
|
59
|
+
"./lib/*": "./lib/*.js",
|
|
60
|
+
"./*": "./*"
|
|
61
|
+
}
|
|
54
62
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
|
-
import { PluginMetrics, METRICS_TIMEOUT } from '../common/metrics-protocol';
|
|
19
|
-
import { AnalyticsFromRequests, DataFromRequest, createRequestData, createDefaultAnalytics, MetricsMap } from '../common/plugin-metrics-types';
|
|
18
|
+
import { PluginMetrics, METRICS_TIMEOUT } from '../common/metrics-protocol.js';
|
|
19
|
+
import { AnalyticsFromRequests, DataFromRequest, createRequestData, createDefaultAnalytics, MetricsMap } from '../common/plugin-metrics-types.js';
|
|
20
20
|
|
|
21
21
|
@injectable()
|
|
22
22
|
export class PluginMetricsCreator {
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
|
-
import { LanguagesMainPluginMetrics } from './plugin-metrics-languages-main';
|
|
19
|
-
import { PluginMetrics, metricsJsonRpcPath } from '../common/metrics-protocol';
|
|
18
|
+
import { LanguagesMainPluginMetrics } from './plugin-metrics-languages-main.js';
|
|
19
|
+
import { PluginMetrics, metricsJsonRpcPath } from '../common/metrics-protocol.js';
|
|
20
20
|
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider';
|
|
21
|
-
import { PluginMetricsCreator } from './plugin-metrics-creator';
|
|
22
|
-
import { PluginMetricsResolver } from './plugin-metrics-resolver';
|
|
23
|
-
import { PluginMetricsOutputChannelRegistry } from './plugin-metrics-output-registry';
|
|
21
|
+
import { PluginMetricsCreator } from './plugin-metrics-creator.js';
|
|
22
|
+
import { PluginMetricsResolver } from './plugin-metrics-resolver.js';
|
|
23
|
+
import { PluginMetricsOutputChannelRegistry } from './plugin-metrics-output-registry.js';
|
|
24
24
|
import { LanguagesMainImpl } from '@theia/plugin-ext/lib/main/browser/languages-main';
|
|
25
25
|
import { OutputChannelRegistryMainImpl } from '@theia/plugin-ext/lib/main/browser/output-channel-registry-main';
|
|
26
26
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { CodeActionProviderDocumentation, Range, SerializedDocumentFilter, WorkspaceSymbolParams } from '@theia/plugin-ext/lib/common/plugin-api-rpc-model';
|
|
18
|
-
import { PluginMetricsResolver } from './plugin-metrics-resolver';
|
|
18
|
+
import { PluginMetricsResolver } from './plugin-metrics-resolver.js';
|
|
19
19
|
import { LanguagesMainImpl } from '@theia/plugin-ext/lib/main/browser/languages-main';
|
|
20
20
|
import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
21
21
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
18
|
import { OutputChannelRegistryMainImpl } from '@theia/plugin-ext/lib/main/browser/output-channel-registry-main';
|
|
19
|
-
import { PluginMetricsCreator } from './plugin-metrics-creator';
|
|
20
|
-
import { createDefaultRequestData } from '../common/plugin-metrics-types';
|
|
19
|
+
import { PluginMetricsCreator } from './plugin-metrics-creator.js';
|
|
20
|
+
import { createDefaultRequestData } from '../common/plugin-metrics-types.js';
|
|
21
21
|
import { PluginInfo } from '@theia/plugin-ext/lib/common/plugin-api-rpc';
|
|
22
22
|
|
|
23
23
|
@injectable()
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
18
18
|
|
|
19
19
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
20
|
-
import { PluginMetricsCreator } from './plugin-metrics-creator';
|
|
21
|
-
import { createRequestData } from '../common/plugin-metrics-types';
|
|
20
|
+
import { PluginMetricsCreator } from './plugin-metrics-creator.js';
|
|
21
|
+
import { createRequestData } from '../common/plugin-metrics-types.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* This class helps resolve language server requests into successes or failures
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import { Container } from '@theia/core/shared/inversify';
|
|
18
18
|
import { expect } from 'chai';
|
|
19
|
-
import { PluginMetrics } from '../common/metrics-protocol';
|
|
20
|
-
import { BrowserOnlyPluginMetrics } from './browser-only-plugin-metrics';
|
|
21
|
-
import pluginMetricsFrontendOnlyModule from './plugin-metrics-frontend-only-module';
|
|
19
|
+
import { PluginMetrics } from '../common/metrics-protocol.js';
|
|
20
|
+
import { BrowserOnlyPluginMetrics } from './browser-only-plugin-metrics.js';
|
|
21
|
+
import pluginMetricsFrontendOnlyModule from './plugin-metrics-frontend-only-module.js';
|
|
22
22
|
|
|
23
23
|
describe('browser-only plugin metrics', () => {
|
|
24
24
|
it('binds the no-op metrics', () => {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable } from '@theia/core/shared/inversify';
|
|
18
|
-
import { PluginMetrics } from '../common/metrics-protocol';
|
|
18
|
+
import { PluginMetrics } from '../common/metrics-protocol.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Browser-only apps have no backend to expose metrics, so they are dropped. The `frontend` module
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
|
-
import { PluginMetrics } from '../common/metrics-protocol';
|
|
19
|
-
import { BrowserOnlyPluginMetrics } from './browser-only-plugin-metrics';
|
|
18
|
+
import { PluginMetrics } from '../common/metrics-protocol.js';
|
|
19
|
+
import { BrowserOnlyPluginMetrics } from './browser-only-plugin-metrics.js';
|
|
20
20
|
|
|
21
21
|
// Loaded instead of the `frontend` module, so plugin API calls aren't wrapped to collect metrics.
|
|
22
22
|
export default new ContainerModule((bind, _unbind, isBound, rebind) => {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { MetricOutput, AnalyticsFromRequests } from '../../common/plugin-metrics-types';
|
|
17
|
+
import { MetricOutput, AnalyticsFromRequests } from '../../common/plugin-metrics-types.js';
|
|
18
18
|
import { injectable } from '@theia/core/shared/inversify';
|
|
19
19
|
|
|
20
20
|
@injectable()
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { MetricOutput, AnalyticsFromRequests } from '../../common/plugin-metrics-types';
|
|
17
|
+
import { MetricOutput, AnalyticsFromRequests } from '../../common/plugin-metrics-types.js';
|
|
18
18
|
import { injectable } from '@theia/core/shared/inversify';
|
|
19
19
|
|
|
20
20
|
@injectable()
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
//
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
|
-
import { PluginMetricTimeCount } from './metric-output/plugin-metrics-time-count';
|
|
17
|
-
import { PluginMetricTimeSum } from './metric-output/plugin-metrics-time-sum';
|
|
18
|
-
import { MetricsMap } from '../common/plugin-metrics-types';
|
|
16
|
+
import { PluginMetricTimeCount } from './metric-output/plugin-metrics-time-count.js';
|
|
17
|
+
import { PluginMetricTimeSum } from './metric-output/plugin-metrics-time-sum.js';
|
|
18
|
+
import { MetricsMap } from '../common/plugin-metrics-types.js';
|
|
19
19
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
20
20
|
|
|
21
21
|
@injectable()
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { AnalyticsFromRequests } from '../common/plugin-metrics-types';
|
|
18
|
-
import { PluginMetricsContributor } from './metrics-contributor';
|
|
17
|
+
import { AnalyticsFromRequests } from '../common/plugin-metrics-types.js';
|
|
18
|
+
import { PluginMetricsContributor } from './metrics-contributor.js';
|
|
19
19
|
import { Container, ContainerModule } from '@theia/core/shared/inversify';
|
|
20
|
-
import { PluginMetricsImpl } from './plugin-metrics-impl';
|
|
21
|
-
import { PluginMetrics } from '../common/metrics-protocol';
|
|
20
|
+
import { PluginMetricsImpl } from './plugin-metrics-impl.js';
|
|
21
|
+
import { PluginMetrics } from '../common/metrics-protocol.js';
|
|
22
22
|
import * as assert from 'assert';
|
|
23
23
|
import { ILogger } from '@theia/core/lib/common/logger';
|
|
24
24
|
import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { PluginMetrics } from '../common/metrics-protocol';
|
|
17
|
+
import { PluginMetrics } from '../common/metrics-protocol.js';
|
|
18
18
|
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import { AnalyticsFromRequests, MetricsMap } from '../common/plugin-metrics-types';
|
|
19
|
+
import { AnalyticsFromRequests, MetricsMap } from '../common/plugin-metrics-types.js';
|
|
20
20
|
|
|
21
21
|
@injectable()
|
|
22
22
|
export class PluginMetricsContributor {
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { MetricsContribution } from '@theia/metrics/lib/node/metrics-contribution';
|
|
18
|
-
import { PluginMetricsContribution } from './plugin-metrics';
|
|
19
|
-
import { PluginMetrics, metricsJsonRpcPath } from '../common/metrics-protocol';
|
|
20
|
-
import { PluginMetricsImpl } from './plugin-metrics-impl';
|
|
18
|
+
import { PluginMetricsContribution } from './plugin-metrics.js';
|
|
19
|
+
import { PluginMetrics, metricsJsonRpcPath } from '../common/metrics-protocol.js';
|
|
20
|
+
import { PluginMetricsImpl } from './plugin-metrics-impl.js';
|
|
21
21
|
import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler';
|
|
22
22
|
import { RpcConnectionHandler } from '@theia/core';
|
|
23
23
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
24
|
-
import { PluginMetricsContributor } from './metrics-contributor';
|
|
25
|
-
import { PluginMetricTimeSum } from './metric-output/plugin-metrics-time-sum';
|
|
26
|
-
import { PluginMetricTimeCount } from './metric-output/plugin-metrics-time-count';
|
|
27
|
-
import { PluginMetricStringGenerator } from './metric-string-generator';
|
|
24
|
+
import { PluginMetricsContributor } from './metrics-contributor.js';
|
|
25
|
+
import { PluginMetricTimeSum } from './metric-output/plugin-metrics-time-sum.js';
|
|
26
|
+
import { PluginMetricTimeCount } from './metric-output/plugin-metrics-time-count.js';
|
|
27
|
+
import { PluginMetricStringGenerator } from './metric-string-generator.js';
|
|
28
28
|
|
|
29
29
|
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30
30
|
bind(PluginMetricTimeSum).toSelf().inSingletonScope();
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable } from '@theia/core/shared/inversify';
|
|
18
|
-
import { PluginMetrics } from '../common/metrics-protocol';
|
|
18
|
+
import { PluginMetrics } from '../common/metrics-protocol.js';
|
|
19
19
|
|
|
20
20
|
@injectable()
|
|
21
21
|
export class PluginMetricsImpl implements PluginMetrics {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { Container, ContainerModule } from '@theia/core/shared/inversify';
|
|
18
|
-
import { PluginMetricsContribution } from './plugin-metrics';
|
|
19
|
-
import { PluginMetricsContributor } from './metrics-contributor';
|
|
20
|
-
import { PluginMetricStringGenerator } from './metric-string-generator';
|
|
21
|
-
import { METRICS_TIMEOUT } from '../common/metrics-protocol';
|
|
18
|
+
import { PluginMetricsContribution } from './plugin-metrics.js';
|
|
19
|
+
import { PluginMetricsContributor } from './metrics-contributor.js';
|
|
20
|
+
import { PluginMetricStringGenerator } from './metric-string-generator.js';
|
|
21
|
+
import { METRICS_TIMEOUT } from '../common/metrics-protocol.js';
|
|
22
22
|
import * as assert from 'assert';
|
|
23
23
|
import * as sinon from 'sinon';
|
|
24
24
|
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
18
|
import { MetricsContribution } from '@theia/metrics/lib/node/metrics-contribution';
|
|
19
|
-
import { METRICS_TIMEOUT } from '../common/metrics-protocol';
|
|
20
|
-
import { PluginMetricsContributor } from './metrics-contributor';
|
|
21
|
-
import { PluginMetricStringGenerator } from './metric-string-generator';
|
|
19
|
+
import { METRICS_TIMEOUT } from '../common/metrics-protocol.js';
|
|
20
|
+
import { PluginMetricsContributor } from './metrics-contributor.js';
|
|
21
|
+
import { PluginMetricStringGenerator } from './metric-string-generator.js';
|
|
22
22
|
|
|
23
23
|
@injectable()
|
|
24
24
|
export class PluginMetricsContribution implements MetricsContribution {
|