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