Make sure you have node and bun installed
Make sure you have k6 installed
For windows, you can install it through choco
choco install k6For Mac, you can install through brew
brew install k6
For linux, you can install it through snap or apt
sudo apt install k6Start all the servers using the following command (open three different terminal sessions for them)
# in apps/express-app directory
node index.ts
# in apps/bun-express-app directory
bun run index.ts
# in apps/elysia-app directory
bun run src/index.tsRun the following command to run the benchmark
node script.jsAfter the tests have been run you can view the results in the results directory
After making 10 runs with a configuration of 10 virtual users in k6, I had the following results.
System specs: 16GB DDR4 RAM, Intel i5-6440HQ @ 2.60GHz, LITEON SSD 128GB
I don't think I have the best implementation as I still had to manually collate the results. I think there's a much better way to automate the benchmarks and if you think you have an idea, I will love to see them.