Skip to content

Commit b416daf

Browse files
committed
lib: move DEP0120 to end of life
This deprecation applies to undocumented, rather useless Windows Performance Counter support. PR-URL: #24862 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 50cf6e7 commit b416daf

File tree

4 files changed

+4
-40
lines changed

4 files changed

+4
-40
lines changed

.eslintrc.js

-6
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,6 @@ module.exports = {
279279
BigInt: false,
280280
BigInt64Array: false,
281281
BigUint64Array: false,
282-
COUNTER_HTTP_CLIENT_REQUEST: false,
283-
COUNTER_HTTP_CLIENT_RESPONSE: false,
284-
COUNTER_HTTP_SERVER_REQUEST: false,
285-
COUNTER_HTTP_SERVER_RESPONSE: false,
286-
COUNTER_NET_SERVER_CONNECTION: false,
287-
COUNTER_NET_SERVER_CONNECTION_CLOSE: false,
288282
DTRACE_HTTP_CLIENT_REQUEST: false,
289283
DTRACE_HTTP_CLIENT_RESPONSE: false,
290284
DTRACE_HTTP_SERVER_REQUEST: false,

doc/api/deprecations.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2254,12 +2254,15 @@ Please make sure to use [`util.getSystemErrorName()`][] instead.
22542254
### DEP0120: Windows Performance Counter Support
22552255
<!-- YAML
22562256
changes:
2257+
- version: REPLACEME
2258+
pr-url: https://github.com/nodejs/node/pull/24862
2259+
description: End-of-Life.
22572260
- version: v11.0.0
22582261
pr-url: https://github.com/nodejs/node/pull/22485
22592262
description: Runtime deprecation.
22602263
-->
22612264
2262-
Type: Runtime
2265+
Type: End-of-Life
22632266
22642267
Windows Performance Counter support has been removed from Node.js. The
22652268
undocumented `COUNTER_NET_SERVER_CONNECTION()`,

lib/internal/bootstrap/node.js

-24
Original file line numberDiff line numberDiff line change
@@ -195,30 +195,6 @@ function startup() {
195195
}
196196
}
197197

198-
// TODO(jasnell): The following have been globals since around 2012.
199-
// That's just silly. The underlying perfctr support has been removed
200-
// so these are now deprecated non-ops that can be removed after one
201-
// major release cycle.
202-
if (process.platform === 'win32') {
203-
const names = [
204-
'NET_SERVER_CONNECTION',
205-
'NET_SERVER_CONNECTION_CLOSE',
206-
'HTTP_SERVER_REQUEST',
207-
'HTTP_SERVER_RESPONSE',
208-
'HTTP_CLIENT_REQUEST',
209-
'HTTP_CLIENT_RESPONSE'
210-
];
211-
for (var n = 0; n < names.length; n++) {
212-
Object.defineProperty(global, `COUNTER_${names[n]}`, {
213-
configurable: true,
214-
enumerable: false,
215-
value: deprecate(noop,
216-
`COUNTER_${names[n]}() is deprecated.`,
217-
'DEP0120')
218-
});
219-
}
220-
}
221-
222198
perf.markMilestone(NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE);
223199

224200
perThreadSetup.setupAllowedFlags();

test/common/index.js

-9
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,6 @@ if (global.DTRACE_HTTP_SERVER_RESPONSE) {
241241
knownGlobals.push(DTRACE_NET_SERVER_CONNECTION);
242242
}
243243

244-
if (global.COUNTER_NET_SERVER_CONNECTION) {
245-
knownGlobals.push(COUNTER_NET_SERVER_CONNECTION);
246-
knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE);
247-
knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST);
248-
knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE);
249-
knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST);
250-
knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE);
251-
}
252-
253244
if (process.env.NODE_TEST_KNOWN_GLOBALS) {
254245
const knownFromEnv = process.env.NODE_TEST_KNOWN_GLOBALS.split(',');
255246
allowGlobals(...knownFromEnv);

0 commit comments

Comments
 (0)