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: filter non-present deps from `start-cli-version` · nodejs/node@2c7d7ca

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark/misc
    • startup-cli-version.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/misc/startup-cli-version.js‎

Copy file name to clipboardExpand all lines: benchmark/misc/startup-cli-version.js
+8-10Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ const path = require('path');
99
// tends to be minimal and fewer operations are done to generate
1010
// these so that the startup cost is still dominated by a more
1111
// indispensible part of the CLI.
12+
// NOTE: not all tools are present in tarball hence need to filter
13+
const availableCli = [
14+
'tools/node_modules/eslint/bin/eslint.js',
15+
'deps/npm/bin/npx-cli.js',
16+
'deps/npm/bin/npm-cli.js',
17+
'deps/corepack/dist/corepack.js',
18+
].filter((cli) => existsSync(path.resolve(__dirname, '../../', cli)));
1219
const bench = common.createBenchmark(main, {
13-
cli: [
14-
'tools/node_modules/eslint/bin/eslint.js',
15-
'deps/npm/bin/npx-cli.js',
16-
'deps/npm/bin/npm-cli.js',
17-
'deps/corepack/dist/corepack.js',
18-
],
20+
cli: availableCli,
1921
count: [30],
2022
});
2123

@@ -47,10 +49,6 @@ function spawnProcess(cli, bench, state) {
4749

4850
function main({ count, cli }) {
4951
cli = path.resolve(__dirname, '../../', cli);
50-
if (!existsSync(cli)) {
51-
return;
52-
}
53-
5452
const warmup = 3;
5553
const state = { count, finished: -warmup };
5654
spawnProcess(cli, bench, state);

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.