diff --git a/benchmark/fixtures/require-builtins.js b/benchmark/fixtures/require-builtins.js new file mode 100644 index 00000000000000..a100e9efd0cae5 --- /dev/null +++ b/benchmark/fixtures/require-builtins.js @@ -0,0 +1,46 @@ +'use strict'; + +const list = [ + 'async_hooks', + 'assert', + 'buffer', + 'child_process', + 'console', + 'constants', + 'crypto', + 'cluster', + 'dgram', + 'dns', + 'domain', + 'events', + 'fs', + 'http', + 'http2', + 'https', + 'inspector', + 'module', + 'net', + 'os', + 'path', + 'perf_hooks', + 'process', + 'punycode', + 'querystring', + 'readline', + 'repl', + 'stream', + 'string_decoder', + 'timers', + 'tls', + 'trace_events', + 'tty', + 'url', + 'util', + 'vm', + 'zlib', +]; + +for (let i = 0; i < list.length; ++i) { + const item = list[i]; + require(item); +} diff --git a/benchmark/misc/startup.js b/benchmark/misc/startup.js index da24ee65199077..dea5a31753f8fe 100644 --- a/benchmark/misc/startup.js +++ b/benchmark/misc/startup.js @@ -7,7 +7,11 @@ let Worker; // Lazy loaded in main const bench = common.createBenchmark(main, { dur: [1], - script: ['benchmark/fixtures/require-cachable', 'test/fixtures/semicolon'], + script: [ + 'benchmark/fixtures/require-builtins', + 'benchmark/fixtures/require-cachable', + 'test/fixtures/semicolon', + ], mode: ['process', 'worker'] }, { flags: ['--expose-internals']