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

feat: allow running in Bun, add to CI #599

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: allow running in Bun, add to CI #599

wants to merge 1 commit into from

Conversation

zbjornson
Copy link
Collaborator

@zbjornson zbjornson commented Nov 25, 2023

Adds feature testing to more default metrics so that Bun (and possibly Deno) work. The metrics are all called node_something_something /shrug.

I think this is all that's required, but our tests didn't catch any failures without these changes. Appreciate any beta-testing from the community.

For some reason, the tests are way slower in Bun (80 vs 5 seconds). idk how to use Bun's profiler with jest. evidently only on my WSL2 environment

oven-sh/bun#4708 will obviate these changes.

Fixes #570

Adds feature testing to more default metrics so that Bun (and possibly Deno) work.

Ref #570
@@ -6,8 +6,10 @@ let perf_hooks;
try {
// eslint-disable-next-line
perf_hooks = require('perf_hooks');
new perf_hooks.PerformanceObserver();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to close this in some way? i.e. https://nodejs.org/api/perf_hooks.html#performanceobserverdisconnect

@LukasDeco
Copy link

@zbjornson are you looking to complete this PR? I am working on a project in Bun that would likely benefit from this.

@SimenB
Copy link
Collaborator

SimenB commented Apr 16, 2024

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

Successfully merging this pull request may close these issues.

Is it possible to use in Bun/Deno/other runtime?
3 participants