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

🚀 Feature: Adding Bun runtime #158

Closed
byawitz opened this issue Apr 11, 2023 · 3 comments
Closed

🚀 Feature: Adding Bun runtime #158

byawitz opened this issue Apr 11, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@byawitz
Copy link
Contributor

byawitz commented Apr 11, 2023

🔖 Feature description

Adding Bun to open-runtimes.

🎤 Pitch

Bun is a real fast JavaScript runtime.

Bun advantages:

  • Built-in server
  • Use typescript files - no need to transpile it happens on the fly.
  • Faster loading time.
  • Blazing fast request processing.
  • Binary lock file.

I've created a few projects with Bun, and the process - building, testing, and producing - was fast and efficient.

📝 Developemnt

I can chip in and create the Bun open runtime.

👀 Have you spent some time checking if this issue has been raised before?
✅ I checked and didn't find a similar issue

🏢 Have you read the Code of Conduct?
✅ I have read the Code of Conduct

@joeyouss
Copy link

Thank you for this feature idea!

Looping in @Meldiron for feedback on this

@joeyouss joeyouss added the enhancement New feature or request label Apr 14, 2023
@byawitz
Copy link
Contributor Author

byawitz commented Apr 20, 2023

I've just run a few benchmarks comparing the results of the same code in Bun vs. Node19 runtime.

The results are implacable; a table here represents the results of the K6 benchmark. (thanks to @Meldiron for that one)

Paramter Bun Node
Max VUS 5,000 5,000
http_req_connecting 1.47µs 2.58µs
http_req_duration 60.07ms 177.12ms
http_req_waiting 60.32ms 177.11ms
http_reqs 2,499,396 857,188
Per second 27,769 9,523

Both tests ran for 90 seconds using a Stress testing method.

export const options = {
 stages: [
   {duration: '30s', target: 20},
   {duration: '10s', target: 5000},
   {duration: '20s', target: 10},
   {duration: '10s', target: 5000},
   {duration: '20s', target: 0},
 ],
};

I've uploaded a pull request of the Bun runtime in a ready-to-use state to be checked when ready.

Thanks

@joeyouss
Copy link

Thank you for raising the PR. We will get it reviewed ASAP

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

No branches or pull requests

2 participants