egg icon indicating copy to clipboard operation
egg copied to clipboard

eggjs/benchmark does not make use of all the cores available

Open joyeecheung opened this issue 8 years ago • 2 comments
trafficstars

  • 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.

joyeecheung avatar Oct 10 '17 03:10 joyeecheung

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.

joyeecheung avatar Oct 10 '17 03:10 joyeecheung

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

joyeecheung avatar Oct 13 '17 08:10 joyeecheung