1 import { exit } from 'node:process'
2 import { parseArgs } from 'node:util'
4 import { run } from 'mitata'
10 } from '../../lib/index.mjs'
11 import { TaskFunctions } from '../benchmarks-types.cjs'
13 buildPoolifierBenchmarkMitata,
14 runPoolifierBenchmarkBenchmarkJsSuite
15 } from '../benchmarks-utils.mjs'
17 const poolSize = availableParallelism()
18 const taskExecutions = 1
20 function: TaskFunctions.factorial,
27 let dynamicClusterPool
38 allowPositionals: true
42 fixedThreadPool = buildPoolifierBenchmarkMitata(
52 dynamicThreadPool = buildPoolifierBenchmarkMitata(
62 fixedClusterPool = buildPoolifierBenchmarkMitata(
72 dynamicClusterPool = buildPoolifierBenchmarkMitata(
83 await fixedThreadPool.destroy()
84 await dynamicThreadPool.destroy()
85 await fixedClusterPool.destroy()
86 await dynamicClusterPool.destroy()
90 await runPoolifierBenchmarkBenchmarkJsSuite(
100 await runPoolifierBenchmarkBenchmarkJsSuite(
110 await runPoolifierBenchmarkBenchmarkJsSuite(
120 await runPoolifierBenchmarkBenchmarkJsSuite(
121 'DynamicClusterPool',