diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index aa166cc931b94f..e43faa68d2ac85 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -125,6 +125,10 @@ if (!config.noBrowserGlobals) { // https://url.spec.whatwg.org/#urlsearchparams exposeInterface(global, 'URLSearchParams', URLSearchParams); + const { performance } = require('perf_hooks'); + // https://www.w3.org/TR/performance-timeline/ + exposeInterface(global, 'performance', performance); + const { TextEncoder, TextDecoder } = require('internal/encoding'); diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index e07ca03e807b5d..ab134d5398f003 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -21,6 +21,7 @@ const expectedModules = new Set([ 'Internal Binding module_wrap', 'Internal Binding native_module', 'Internal Binding options', + 'Internal Binding performance', 'Internal Binding process_methods', 'Internal Binding report', 'Internal Binding string_decoder', @@ -30,6 +31,7 @@ const expectedModules = new Set([ 'Internal Binding types', 'Internal Binding url', 'Internal Binding util', + 'NativeModule async_hooks', 'NativeModule buffer', 'NativeModule events', 'NativeModule fs', @@ -45,6 +47,7 @@ const expectedModules = new Set([ 'NativeModule internal/fixed_queue', 'NativeModule internal/fs/dir', 'NativeModule internal/fs/utils', + 'NativeModule internal/histogram', 'NativeModule internal/idna', 'NativeModule internal/linkedlist', 'NativeModule internal/modules/run_main', @@ -80,8 +83,10 @@ const expectedModules = new Set([ 'NativeModule internal/validators', 'NativeModule internal/vm/module', 'NativeModule path', + 'NativeModule perf_hooks', 'NativeModule timers', 'NativeModule url', + 'NativeModule util', 'NativeModule vm', ]);