From 8fdf8bf59f4ddd75362f1955282354e7cc2dfdfc 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 Signed-off-by: James M Snell --- .eslintrc.js | 1 + doc/api/globals.md | 5 +++++ lib/internal/bootstrap/node.js | 23 +++++++++++++++++++++++ test/common/index.js | 3 +++ test/parallel/test-performance-global.js | 14 ++++++++++++++ test/wpt/test-hr-time.js | 3 +-- 6 files changed, 47 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`