-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
benchmark: add startup benchmark for loading public modules
Adding a new benchmark for testing the performance of loading available public modules. PR-URL: #35816 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
- Loading branch information
1 parent
5c3e56b
commit 9f0b1e3
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters