Détail du package

@jamen/bench

jamen80.4.0

Better defaults for Benchmark.js.

readme

bench

Better defaults for Benchmark.js.

Install

npm i @jamen/bench

Usage

benchmark()

Create a Benchmark.Suite with event listeners that report for you. Also reports the CPU and memory. Use .add calls then .run to perform the benchmarks.

let bench = benchmark()

bench.add('foobar', () => {
  foobar()
})

bench.run()