0d0b3671b171749b9792c7254d11887d1387469c
1 const Benchmark
= require('benny')
7 return new Promise(resolve
=> {
15 async
function asyncFunction () {
16 return await
promise()
21 Benchmark
.add('await promise', async () => {
23 return await
asyncFunction()
28 Benchmark
.add('promise with then().catch()', () => {
37 Benchmark
.add('mishandled promise', () => {
43 file
: 'promise-handling',
48 file
: 'promise-handling',
53 file
: 'promise-handling',