| 44 | * @param {import('tinybench').Bench} bench |
| 45 | */ |
| 46 | export default function register(bench) { |
| 47 | { |
| 48 | const hook = makeHook(10, "sync", -1); |
| 49 | bench.add("async-series-bail-hook: 10 sync taps, no bail", () => |
| 50 | runBatch(hook) |
| 51 | ); |
| 52 | } |
| 53 | { |
| 54 | const hook = makeHook(10, "sync", 4); |
| 55 | bench.add("async-series-bail-hook: 10 sync taps, bail mid", () => |
| 56 | runBatch(hook) |
| 57 | ); |
| 58 | } |
| 59 | { |
| 60 | const hook = makeHook(5, "async", -1); |
| 61 | bench.add("async-series-bail-hook: 5 async taps, no bail", () => |
| 62 | runBatch(hook) |
| 63 | ); |
| 64 | } |
| 65 | { |
| 66 | const hook = makeHook(5, "async", 2); |
| 67 | bench.add("async-series-bail-hook: 5 async taps, bail mid", () => |
| 68 | runBatch(hook) |
| 69 | ); |
| 70 | } |
| 71 | } |