docs now feature writing good benchmarks section to help people with improving their micro-benchmarks
🚀 New Features
concurrency benchmarks
mitata now offers quick and transparent way to test concurrency of asynchronous functions
bench('sleep(1000) x $concurrency', function* () {
yield async () => await sleep(1000);
}).range('concurrency', 1, 1024);
benchmark avg (min … max) p75 p99 (min … top 1%)
------------------------------------------- -------------------------------
sleep(1000) x 1 1.00 s/iter 1.00 s █ █ █
(1.00 s … 1.00 s) 1.00 s █▁███▁▁▁▁▁█▁▁▁▁█▁▁█▁█
sleep(1000) x 8 1.00 s/iter 1.00 s █ █
(1.00 s … 1.00 s) 1.00 s ▆▁▁▆▁▁▁▁▁▁▁█▁▁▁▆▁▆█▁▆
sleep(1000) x 64 1.00 s/iter 1.00 s ██ █
(1.00 s … 1.00 s) 1.00 s █▁▁▁█▁▁▁▁▁▁██▁███▁▁▁█
sleep(1000) x 512 1.00 s/iter 1.00 s █ ▃ █
(1.00 s … 1.00 s) 1.00 s ▆▁▁▁▁▁▁▁▁▆▆█▁█▁▁▁▁▁▁█
sleep(1000) x 1024 1.00 s/iter 1.00 s ▃ █ ▃
(1.00 s … 1.00 s) 1.00 s ▆▁▁▁▁▆▁█▁█▆▆▁▁▁▁▁▁▁▁█