egg
egg copied to clipboard
eggjs/benchmark does not make use of all the cores available
- Node Version: all
- Platform: Intel Xeon
The number of workers is hard-coded in dispatch.js of all cases e.g. :
https://github.com/eggjs/benchmark/blob/master/simple/dispatch.js#L5-L8
And the number of threads used to run the benchmark is also hard-coded, e.g.: https://github.com/eggjs/benchmark/blob/master/simple/run.sh#L51-L55
We should also make it possible to fire requests from another machine instead of the one serving them.
Another issue not completely related to CPU utilization: we should still support the benchmark on older versions of Node.js whenever possible. We can just disable the tests that require async/await .etc on them.
After talking with @fengmk2 just learned that the number of workers is hard-coded to prevent Travis CI flakiness. I will try to fix dispatch.js and compatibility with older versions of Node.js over the weekend or next week