| 44 | * @param {import('tinybench').Bench} bench |
| 45 | */ |
| 46 | export default function register(bench) { |
| 47 | for (const n of [1, 5, 20]) { |
| 48 | const hook = makeHook(n, "sync"); |
| 49 | bench.add(`async-series-waterfall-hook: ${n} sync taps`, () => |
| 50 | runBatch(hook) |
| 51 | ); |
| 52 | } |
| 53 | |
| 54 | { |
| 55 | const hook = makeHook(5, "async"); |
| 56 | bench.add("async-series-waterfall-hook: 5 async taps", () => |
| 57 | runBatch(hook) |
| 58 | ); |
| 59 | } |
| 60 | |
| 61 | { |
| 62 | const hook = makeHook(5, "promise"); |
| 63 | bench.add("async-series-waterfall-hook: 5 promise taps", () => |
| 64 | runBatch(hook) |
| 65 | ); |
| 66 | } |
| 67 | } |