-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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 <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
- Loading branch information
1 parent
fb71964
commit 9b549c1
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