182ba772bef44b6c60ced6f74e6e1d79a15920ec
1 const Benchmark
= require('benchmark')
2 const { LIST_FORMATTER
} = require('./benchmark-utils')
4 const suite
= new Benchmark
.Suite()
10 async
function asyncFunction () {
15 .add('await promise', async
function () {
18 .add('promise', function () {
21 .on('cycle', function (event
) {
22 console
.log(event
.target
.toString())
24 .on('complete', function () {
26 'Fastest is ' + LIST_FORMATTER
.format(this.filter('fastest').map('name'))
28 // eslint-disable-next-line no-process-exit