MCPcopy
hub / github.com/webpack/tapable / register

Function register

benchmark/cases/async-series-bail-hook/index.bench.mjs:46–71  ·  view source on GitHub ↗
(bench)

Source from the content-addressed store, hash-verified

44 * @param {import('tinybench').Bench} bench
45 */
46export 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}

Callers

nothing calls this directly

Calls 2

makeHookFunction · 0.70
runBatchFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…