Skip to content

Commit 664553e

Browse files
committed
add all values benchmarks
1 parent 05a0825 commit 664553e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

benchmarks/all.async.js

+16
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ const all = require('../all')
33

44
const suite = new TimeInLoopSuite({ async: true, loopCount: 1e5 })
55

6+
suite.add('rubico async array all promises', async () => {
7+
await all([
8+
Promise.resolve(1),
9+
Promise.resolve(2),
10+
Promise.resolve(3),
11+
])
12+
})
13+
14+
suite.add('rubico async object all promises', async () => {
15+
await all({
16+
a: Promise.resolve(1),
17+
b: Promise.resolve(2),
18+
c: Promise.resolve(3),
19+
})
20+
})
21+
622
suite.add('rubico async array all', async () => {
723
await all(5, [
824
async value => value + 1,

0 commit comments

Comments
 (0)