🚀 A CLI to benchmark the loading of an ESM graph in Node
MIT License
Install the dependency: pnpm install -D node-module-benchmarker
and use the node-module-benchmarker
executable instead of node
specifying the output path with the environment variable BENCHMARK_OUTPUT_PATH
.
For example, BENCHMARK_OUTPUT_PATH=benchmark.json pnpm exec node-module-benchmarker src/index.js
instead of node src/index.js
.
The tool will benchmark the time it takes to load the CJS and ESM modules, stop the execution after 5 seconds, and output the results.
git clone https://github.com/catalysisdev/node-module-benchmarker.git
.pnpm install
.pnpm build
pnpm test
.