nodesource/nodejs-package-benchmark

Support HTTP frameworks

Opened this issue · 3 comments

As I wrote in 970d2d7. Benchmarking HTTP is more complicated than just running autocannon. I believe we should create an option for this script such as:

$ node index.js HTTP

to focus only on the HTTP benchmark, then use a different algorithm to collect reliable results.

working in a simple poc with k6
there i'm planning to create a pipeline with many kinds of load tests and using containers to be able to set a resource limitation for the server/load-tester

I did a POC where we can run many kind of load tests
there we can specify custom metrics, checks and create different scenarios to be executed in sequence, for example: start with an smoke test to make the runtime(v8) apply compiler optimizations(JIT) then we start to do a load test, then a stress test... until arrives at breakpoint test

may we can do it using autocannon but i think we will have a little of work there

PTAL at test.js file, I commented all lines to maintain the POC pretty explainable

i did an separated repo to open it for discussion, changes and etc, so when approved i can plug it into this repository

repository here

Can you paste the output example here?

I'm not sure that using docker is a good option for this project as we'd like to be cross-platform and plug & play. IIRC docker is a mess on OSX and Windows.

However, we could make it optional behind a flag (--http), we just need to make sure the results are consistent between runs, so if you want to make a PR we could measure it