+ }
+ )
+ fixedClusterPool = buildPoolifierBenchmarkMitata(
+ 'FixedClusterPool',
+ WorkerTypes.cluster,
+ PoolTypes.fixed,
+ poolSize,
+ {
+ taskExecutions,
+ workerData
+ }
+ )
+ dynamicClusterPool = buildPoolifierBenchmarkMitata(
+ 'DynamicClusterPool',
+ WorkerTypes.cluster,
+ PoolTypes.dynamic,
+ poolSize,
+ {
+ taskExecutions,
+ workerData
+ }
+ )
+ await run()
+ await fixedThreadPool.destroy()
+ await dynamicThreadPool.destroy()
+ await fixedClusterPool.destroy()
+ await dynamicClusterPool.destroy()
+ break
+ case 'benchmark.js':
+ default:
+ await runPoolifierBenchmarkBenchmarkJsSuite(
+ 'FixedThreadPool',
+ WorkerTypes.thread,
+ PoolTypes.fixed,
+ poolSize,
+ {
+ taskExecutions,
+ workerData
+ }
+ )
+ await runPoolifierBenchmarkBenchmarkJsSuite(
+ 'DynamicThreadPool',
+ WorkerTypes.thread,
+ PoolTypes.dynamic,
+ poolSize,
+ {
+ taskExecutions,
+ workerData
+ }
+ )
+ await runPoolifierBenchmarkBenchmarkJsSuite(
+ 'FixedClusterPool',
+ WorkerTypes.cluster,
+ PoolTypes.fixed,
+ poolSize,
+ {
+ taskExecutions,
+ workerData
+ }
+ )
+ await runPoolifierBenchmarkBenchmarkJsSuite(
+ 'DynamicClusterPool',
+ WorkerTypes.cluster,
+ PoolTypes.dynamic,
+ poolSize,
+ {
+ taskExecutions,
+ workerData
+ }
+ )
+ break
+}