From b416dafb87e50b66479a7a73970a930f1c7dcada Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 5 Dec 2018 23:50:28 -0500 Subject: [PATCH] lib: move DEP0120 to end of life MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This deprecation applies to undocumented, rather useless Windows Performance Counter support. PR-URL: https://github.com/nodejs/node/pull/24862 Reviewed-By: Ben Noordhuis Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Michaƫl Zasso Reviewed-By: Matteo Collina --- .eslintrc.js | 6 ------ doc/api/deprecations.md | 5 ++++- lib/internal/bootstrap/node.js | 24 ------------------------ test/common/index.js | 9 --------- 4 files changed, 4 insertions(+), 40 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6dda76cb4ea985..370dfaed688245 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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, diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 3a515ba2769cf6..3debf8297179ab 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2254,12 +2254,15 @@ Please make sure to use [`util.getSystemErrorName()`][] instead. ### DEP0120: Windows Performance Counter Support -Type: Runtime +Type: End-of-Life Windows Performance Counter support has been removed from Node.js. The undocumented `COUNTER_NET_SERVER_CONNECTION()`, diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 816957ae59b022..b537e62fe99d83 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -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(); diff --git a/test/common/index.js b/test/common/index.js index 33089e69af6072..3d7a0187ee5cd8 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -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);