Skip to content

Commit

Permalink
lib: move DEP0120 to end of life
Browse files Browse the repository at this point in the history
This deprecation applies to undocumented, rather useless
Windows Performance Counter support.

PR-URL: nodejs#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]>
  • Loading branch information
cjihrig authored and refack committed Jan 10, 2019
1 parent 5e3e601 commit 6cebaf7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,6 @@ module.exports = {
BigInt: false,
BigInt64Array: false,
BigUint64Array: false,
COUNTER_HTTP_CLIENT_REQUEST: false,
COUNTER_HTTP_CLIENT_RESPONSE: false,
COUNTER_HTTP_SERVER_REQUEST: false,
COUNTER_HTTP_SERVER_RESPONSE: false,
COUNTER_NET_SERVER_CONNECTION: false,
COUNTER_NET_SERVER_CONNECTION_CLOSE: false,
DTRACE_HTTP_CLIENT_REQUEST: false,
DTRACE_HTTP_CLIENT_RESPONSE: false,
DTRACE_HTTP_SERVER_REQUEST: false,
Expand Down
5 changes: 4 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2254,12 +2254,15 @@ Please make sure to use [`util.getSystemErrorName()`][] instead.
### DEP0120: Windows Performance Counter Support
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/24862
description: End-of-Life.
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22485
description: Runtime deprecation.
-->
Type: Runtime
Type: End-of-Life
Windows Performance Counter support has been removed from Node.js. The
undocumented `COUNTER_NET_SERVER_CONNECTION()`,
Expand Down
24 changes: 0 additions & 24 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,30 +195,6 @@ function startup() {
}
}

// TODO(jasnell): The following have been globals since around 2012.
// That's just silly. The underlying perfctr support has been removed
// so these are now deprecated non-ops that can be removed after one
// major release cycle.
if (process.platform === 'win32') {
const names = [
'NET_SERVER_CONNECTION',
'NET_SERVER_CONNECTION_CLOSE',
'HTTP_SERVER_REQUEST',
'HTTP_SERVER_RESPONSE',
'HTTP_CLIENT_REQUEST',
'HTTP_CLIENT_RESPONSE'
];
for (var n = 0; n < names.length; n++) {
Object.defineProperty(global, `COUNTER_${names[n]}`, {
configurable: true,
enumerable: false,
value: deprecate(noop,
`COUNTER_${names[n]}() is deprecated.`,
'DEP0120')
});
}
}

perf.markMilestone(NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE);

perThreadSetup.setupAllowedFlags();
Expand Down
9 changes: 0 additions & 9 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,6 @@ if (global.DTRACE_HTTP_SERVER_RESPONSE) {
knownGlobals.push(DTRACE_NET_SERVER_CONNECTION);
}

if (global.COUNTER_NET_SERVER_CONNECTION) {
knownGlobals.push(COUNTER_NET_SERVER_CONNECTION);
knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE);
knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST);
knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE);
knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST);
knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE);
}

if (process.env.NODE_TEST_KNOWN_GLOBALS) {
const knownFromEnv = process.env.NODE_TEST_KNOWN_GLOBALS.split(',');
allowGlobals(...knownFromEnv);
Expand Down

0 comments on commit 6cebaf7

Please sign in to comment.