benchmark-json-reporter
Returns an array with the data for every benchmark of the suite. The default callback writes it to the <rootFolder>/benchmarks/<suiteName>.json
file. No npm dependencies.
It works only in NodeJS.
Installation
yarn add benchmark benchmark-json-reporter
Or
npm install --save benchmark benchmark-json-reporter
Function firm
Usage
Using the default callback
const Benchmark = ;const jsonReporter = ; const suite = 'my-bench-suite'; // Just this; suite // ... // run async ;
Using a custom callback
const Benchmark = ;const jsonReporter = ; const suite = 'my-bench-suite'; // Just this; suite // ... // run async ;