Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Node and Bun labels to bars in chart #1547

Open
vbudovski opened this issue Jan 13, 2025 · 1 comment
Open

Add Node and Bun labels to bars in chart #1547

vbudovski opened this issue Jan 13, 2025 · 1 comment

Comments

@vbudovski
Copy link
Contributor

vbudovski commented Jan 13, 2025

It's very difficult to tell which bar belongs to which runtime in the chart. It would be good add a label so it's clear. Ideally, it would be formatted as <Node version> <V8 version> e.g. Node v22.12.0 V8 12.4.254.21-node.21. For Bun, it would be very similar <Bun version> <WebKit version> e.g. Bun 1.1.43 WebKit 2.47.2.

Getting the Node versions is very easy:

node --version
// v22.12.0
node -p process.versions.v8
// 12.4.254.21-node.21

For Bun it's a little bit less easy:

bun --version
// 1.1.43
bun bun-version.js
// 2.47.2

bun-version.js

// `process.versions.webkit` gives the commit hash of the forked WebKit.
const releases = await fetch(
  `https://raw.githubusercontent.com/oven-sh/WebKit/${process.versions.webkit}/Source/WebKit/wpe/NEWS`,
).then(response => response.text());
const release = releases
  .matchAll(/^WPE WebKit (?<release>\d+\.\d+\.\d)+$/gm)
  .map(m => m.groups.release)
  .next().value;
console.log(release);
Screenshot 2025-01-13 at 8 10 02 pm
@DarkGL
Copy link
Collaborator

DarkGL commented Jan 18, 2025

I wanted to add it, but I failed to do it with current graph lib, there are other issues where we discuss changing it to something more modern and versatile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants