pepicrft / node-module-benchmarker

πŸš€ A CLI to benchmark the loading of an ESM graph in Node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/catalysisdev/node-module-benchmarker.git.
  2. Install dependencies: pnpm install.
  3. Build: pnpm build
  4. Test: pnpm test.

System requirements

References

About

πŸš€ A CLI to benchmark the loading of an ESM graph in Node

License:MIT License


Languages

Language:TypeScript 84.4%Language:JavaScript 15.6%