From f0bf37317604061dc60ebf858d6ad4dfc313dcdc Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 29 Mar 2021 14:09:59 -0700 Subject: [PATCH] perf_hooks: make performance a global MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: James M Snell PR-URL: https://github.com/nodejs/node/pull/37970 Reviewed-By: Michaƫl Zasso Reviewed-By: Michael Dawson Reviewed-By: Anto Aravinth --- .eslintrc.js | 1 + doc/api/globals.md | 5 +++++ lib/internal/bootstrap/node.js | 23 +++++++++++++++++++++++ test/common/index.js | 4 ++++ test/parallel/test-global.js | 1 + test/parallel/test-performance-global.js | 18 ++++++++++++++++++ test/wpt/test-hr-time.js | 3 +-- 7 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-performance-global.js diff --git a/.eslintrc.js b/.eslintrc.js index 3f47ddf45d0534..9579162dcf868c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -331,5 +331,6 @@ module.exports = { globalThis: 'readable', btoa: 'readable', atob: 'readable', + performance: 'readable', }, }; diff --git a/doc/api/globals.md b/doc/api/globals.md index 831ef06bec6094..13e7f63d01b713 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -279,6 +279,10 @@ The `MessagePort` class. See [`MessagePort`][] for more details. This variable may appear to be global but is not. See [`module`][]. +## `performance` + +The [`perf_hooks.performance`][] object. + ## `process`