tinylibs / tinybench

🔎 A simple, tiny and lightweight benchmarking library!
MIT License
1.73k stars 36 forks source link

Concurrent benchmarking #74

Closed t3dotgg closed 5 months ago

t3dotgg commented 5 months ago

I was hoping to do some testing of how JS frameworks perform when getting multiple requests at a time. A concurrency limit flag would be dope.

Did some reading of past issues and I don't fully agree with the removal of the previous parallel options. Surely it won't be perfectly accurate, but no benchmark is

Aslemammad commented 5 months ago

Hey Theo. Yea it makes sense, one of the reasons was that it was using so many resources so thought maybe it's not ideal at all.

I can add an option called { concurrency: boolean | number } or a new method called runConcurrently(number).

Let me know which one works better for you.

t3dotgg commented 5 months ago

Slightly leaning towards the alternative runner but I'd default to your judgement @Aslemammad !

Aslemammad commented 5 months ago

Just released v2.7.0, let me know if there's any issue.