GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: add startup benchmark for loading public modules · nodejs/node@21d3ccf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark
    • fixtures
      • require-builtins.js
    • misc
      • startup.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/fixtures/require-builtins.js‎

Copy file name to clipboard
+46Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
'use strict';
2+
3+
const list = [
4+
'async_hooks',
5+
'assert',
6+
'buffer',
7+
'child_process',
8+
'console',
9+
'constants',
10+
'crypto',
11+
'cluster',
12+
'dgram',
13+
'dns',
14+
'domain',
15+
'events',
16+
'fs',
17+
'http',
18+
'http2',
19+
'https',
20+
'inspector',
21+
'module',
22+
'net',
23+
'os',
24+
'path',
25+
'perf_hooks',
26+
'process',
27+
'punycode',
28+
'querystring',
29+
'readline',
30+
'repl',
31+
'stream',
32+
'string_decoder',
33+
'timers',
34+
'tls',
35+
'trace_events',
36+
'tty',
37+
'url',
38+
'util',
39+
'vm',
40+
'zlib',
41+
];
42+
43+
for (let i = 0; i < list.length; ++i) {
44+
const item = list[i];
45+
require(item);
46+
}
Collapse file

‎benchmark/misc/startup.js‎

Copy file name to clipboardExpand all lines: benchmark/misc/startup.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ let Worker; // Lazy loaded in main
77

88
const bench = common.createBenchmark(main, {
99
dur: [1],
10-
script: ['benchmark/fixtures/require-cachable', 'test/fixtures/semicolon'],
10+
script: [
11+
'benchmark/fixtures/require-builtins',
12+
'benchmark/fixtures/require-cachable',
13+
'test/fixtures/semicolon',
14+
],
1115
mode: ['process', 'worker']
1216
}, {
1317
flags: ['--expose-internals']

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.