0.1.0 • Published 1 year ago

node-module-benchmarker v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

node-module-benchmarker

node-module-benchmarker

Usage

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.

Development

Setup

  1. Clone the repository: git clone https://github.com/pepicrft/node-module-benchmarker.git.
  2. Install dependencies: pnpm install.
  3. Build: pnpm build
  4. Test: pnpm test.

System requirements

References