Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
benchmark: rewrite the startup performance benchmark
The previous benchmark was inaccurate in several ways: - It previously measured "how many workers/child processes can finish loading in parallel in 1 second" which is prone to wrong interpretations. It's also not typical for users to spin up >20 workers/child processes in parallel, which was what the benchmark usually ended up doing. The parallelism can also be greatly affected by system configurations. - The time spent on loading a Node.js binary for the first time varies greatly depending on system configurations, but it was inevitable for the benchmark to load Node.js multiple times to reduce the influence of fluctuations. This patch rewrites the benchmark so that: - It now measures "how long it takes to finish 30 workers/child processes in serial" which is generally more in line with how other benchmarks are written and with the figures one gets from doing something like `time node index.js` or `hyperfine 'node index.js'` - It now warms up the loading of the Node.js instance to reduce the statistical outliers, so that we get more meaningful figures when trying to compare the startup performance of different Node.js binaries.
- Loading branch information