- })
- .add('setIntervalTimeoutBusyWait', () => {
- setIntervalTimeoutBusyWait(timeout)
- })
- .on('cycle', event => {
- console.log(event.target.toString())
- })
- .on('complete', function () {
- console.log(
- 'Fastest is ' + LIST_FORMATTER.format(this.filter('fastest').map('name'))
- )
- // eslint-disable-next-line n/no-process-exit
- process.exit()
- })
- .run()
+ }),
+ Benchmark.add('setIntervalTimeoutBusyWait', async () => {
+ await setIntervalTimeoutBusyWait(timeout)
+ }),
+ Benchmark.cycle(),
+ Benchmark.complete(),
+ Benchmark.save({ file: 'busy-wait', format: 'json', details: true }),
+ Benchmark.save({ file: 'busy-wait', format: 'chart.html', details: true }),
+ Benchmark.save({ file: 'busy-wait', format: 'table.html', details: true })
+)