Bottleneck.js is a CLI tool that profiles custom JavaScript functions of an input file and calculates their execution time. It's built with Node.js and uses the Bun runtime for fast execution.
- Measures the execution time of custom functions in a JavaScript file
- Uses the Bun runtime for fast execution
- Outputs a report file with the profiling results
You can install the CLI globally with:
npm i -g .
Then, to see if it's working you can run:
bn
On your terminal.
bn is a shorthand for bottleneck-js.
To measure the execution time of all functions in a file, use the measure
command:
bn measure <filePath>
You can specify the output file path with the -o
or --output
option:
bn measure <filePath> -o <outputPath>
Feel free to contribute with Bottleneck.js if you want.
Bottleneck.js is licensed under the MIT License.