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 misc/startup-cli-version benchmark by joyeecheung · Pull Request #50684 · nodejs/node

Conversation

@joyeecheung

@joyeecheung joyeecheung commented Nov 12, 2023

Copy link
Copy Markdown
Member

This benchmarks the startup of various CLI tools that are already checked into the source code. We use --version because the output tends to be minimal and fewer operations are done to generate these so that the startup cost is still dominated by a more indispensible part of the CLI.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added the benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. label Nov 12, 2023
@joyeecheung joyeecheung mentioned this pull request Nov 12, 2023
src: move package_json_reader cache to c++ #50322
Closed
8 tasks done
@joyeecheung
joyeecheung force-pushed the startup-cli branch 5 times, most recently from 90e9da6 to 29b034f Compare November 12, 2023 09:55
jasnell
jasnell reviewed Nov 12, 2023
View reviewed changes
Comment thread benchmark/misc/startup-cli-version.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed Nov 12, 2023
View reviewed changes
Comment thread benchmark/misc/startup-cli-version.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@GeoffreyBooth

GeoffreyBooth commented Nov 12, 2023

Copy link
Copy Markdown
Member

You could add TypeScript too.

Are all of these CommonJS? Is there anything we can add to benchmark ESM startup?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

anonrig
anonrig approved these changes Nov 12, 2023
View reviewed changes
@joyeecheung

joyeecheung commented Nov 12, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

You could add TypeScript too.

We don’t have the TypeScript CLI checked in, only one library bundle is in the fixtures (so that's supposed to be require()d). Though that could probably be added to the other startup benchmark or as a CommonJS bundle loading benchmark of its own. Probably out of scope for this one though.

Are all of these CommonJS? Is there anything we can add to benchmark ESM startup?

I can’t find any existing CLI checked into the code base using ESM. If we have something in the future or if any one of them gets updated to use ESM then that can be covered. Otherwise I guess this is just what we have for now. This just serves as “since we already have some real-world CLIs checked in the code base, might as well use them for some benchmarking to ensure we don’t regress real-world CLIs”. Whether these real-world CLIs uses ESM is up to them.

If we really want to check ESM performance for CLIs that we don’t use, I’d suggest doing it in a different repo (the CLIs listed here are already making the checkout humongous, but then we at least have some proper use of them other than benchmarking). I'd say the same applies to the maintenance of this list - if for some reason we no longer use any of them (I doubt that though, maybe eslint can go away in the future? But the other two probably won't), we should just remove them from this benchmark and should't keep them in the codebase just for benchmarking.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung
benchmark: add misc/startup-cli-version benchmark
a6eccf6
This benchmarks the startup of various CLI tools that are already
checked into the source code. We use --version because the output
tends to be minimal and fewer operations are done to generate
these so that the startup cost is still dominated by a more
indispensible part of the CLI.
@joyeecheung
joyeecheung force-pushed the startup-cli branch from 29b034f to a6eccf6 Compare November 12, 2023 15:52
jasnell
jasnell approved these changes Nov 12, 2023
View reviewed changes
@anonrig anonrig added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 12, 2023
anonrig
anonrig approved these changes Nov 12, 2023
View reviewed changes
@GeoffreyBooth

GeoffreyBooth commented Nov 12, 2023

Copy link
Copy Markdown
Member

I can’t find any existing CLI checked into the code base using ESM. If we have something in the future or if any one of them gets updated to use ESM then that can be covered. Otherwise I guess this is just what we have for now.

Yeah, this is something we need but I agree I don’t want to add unnecessary dependencies to the repo.

You could perhaps have another set of spawn calls that include --import 'data:text/javascript,' (a no-op --import) to trigger the handling of the entry point to be by the ESM loader. Everything after the initial entry would still be handled by the CommonJS loader, but at least we would be benchmarking the “startup to ESM entry” part of the flow.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung

joyeecheung commented Nov 12, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

You could perhaps have another set of spawn calls that include --import 'data:text/javascript,' (a no-op --import) to trigger the handling of the entry point to be by the ESM loader.

That sounds like a separate benchmark than this one, which is about real world CLIs. I haven’t seen any CLIs that would be loaded this way in the real world (maybe there are, but I just haven’t seen any)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 12, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 12, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 12, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55600/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung joyeecheung mentioned this pull request Nov 13, 2023
Enable Maglev #50690
Closed
6 tasks done
merceyz
merceyz reviewed Nov 13, 2023
View reviewed changes
Comment thread benchmark/misc/startup-cli-version.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 14, 2023
CI Reliability 2023-11-14 nodejs/reliability#717
Open
CI Reliability 2023-11-15 nodejs/reliability#718
Open
@nodejs-github-bot

nodejs-github-bot commented Nov 15, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55661/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung joyeecheung added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 15, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 15, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 59b27d6 into nodejs:main Nov 15, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 15, 2023

Copy link
Copy Markdown
Collaborator

Landed in 59b27d6

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request Nov 23, 2023
@joyeecheung @targos
benchmark: add misc/startup-cli-version benchmark
f7245d7
This benchmarks the startup of various CLI tools that are already
checked into the source code. We use --version because the output
tends to be minimal and fewer operations are done to generate
these so that the startup cost is still dominated by a more
indispensible part of the CLI.

PR-URL: #50684
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Nov 28, 2023
v21.3.0 proposal #50954
Merged
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
@joyeecheung @UlisesGascon
benchmark: add misc/startup-cli-version benchmark
9adc8ae
This benchmarks the startup of various CLI tools that are already
checked into the source code. We use --version because the output
tends to be minimal and fewer operations are done to generate
these so that the startup cost is still dominated by a more
indispensible part of the CLI.

PR-URL: #50684
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
v20.11.0 proposal #51124
Merged
@AdamMajer AdamMajer mentioned this pull request Dec 13, 2023
tests: tools/node_modules is not present in tarball #51145
Closed
AdamMajer added a commit to AdamMajer/node that referenced this pull request Dec 15, 2023
@AdamMajer
benchmark: remove dependency on unshipped tools
35403d7
tools/node_modules is removed from the tarball so it should not be used
as part of unit tests or benchmarks.

Fixes: nodejs#51145
Refs: nodejs#50684
UlisesGascon pushed a commit that referenced this pull request Dec 19, 2023
@joyeecheung @UlisesGascon
benchmark: add misc/startup-cli-version benchmark
9857364
This benchmarks the startup of various CLI tools that are already
checked into the source code. We use --version because the output
tends to be minimal and fewer operations are done to generate
these so that the startup cost is still dominated by a more
indispensible part of the CLI.

PR-URL: #50684
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: James M Snell <[email protected]>
jasnell pushed a commit that referenced this pull request Dec 25, 2023
@AdamMajer @jasnell
benchmark: remove dependency on unshipped tools
345f15e
tools/node_modules is removed from the tarball so it should not be used
as part of unit tests or benchmarks.

Fixes: #51145
Refs: #50684
PR-URL: #51146
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Jan 2, 2024
@AdamMajer @RafaelGSS
benchmark: remove dependency on unshipped tools
4dcc511
tools/node_modules is removed from the tarball so it should not be used
as part of unit tests or benchmarks.

Fixes: #51145
Refs: #50684
PR-URL: #51146
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@merceyz merceyz mentioned this pull request Jan 5, 2024
v8: enable maglev on supported architectures #51360
Merged
@AdamMajer AdamMajer mentioned this pull request Feb 13, 2024
benchmark: move non-present deps down the list #51746
Merged
richardlau pushed a commit that referenced this pull request Mar 25, 2024
@AdamMajer @richardlau
benchmark: remove dependency on unshipped tools
4be33b5
tools/node_modules is removed from the tarball so it should not be used
as part of unit tests or benchmarks.

Fixes: #51145
Refs: #50684
PR-URL: #51146
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit that referenced this pull request May 11, 2024
@AdamMajer
benchmark: filter non-present deps from start-cli-version
b1515c7
PR-URL: #51746
Refs: #51146
Refs: #50684
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
targos pushed a commit that referenced this pull request May 11, 2024
@AdamMajer @targos
benchmark: filter non-present deps from start-cli-version
2c7d7ca
PR-URL: #51746
Refs: #51146
Refs: #50684
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
marco-ippolito pushed a commit that referenced this pull request Jun 17, 2024
@AdamMajer @marco-ippolito
benchmark: filter non-present deps from start-cli-version
184cfe5
PR-URL: #51746
Refs: #51146
Refs: #50684
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
@AdamMajer @soophoo
benchmark: filter non-present deps from start-cli-version
3910b40
PR-URL: nodejs#51746
Refs: nodejs#51146
Refs: nodejs#50684
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@anonrig anonrig anonrig approved these changes
+1 more reviewer
@merceyz merceyz merceyz left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@joyeecheung @GeoffreyBooth @nodejs-github-bot @jasnell @anonrig @merceyz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.