refactor: cleanup worker.addTaskFunction()
[poolifier.git] / benchmarks / internal / bench.mjs
index 6fad24c76a85f1878a95c843eadcefc1fbcc8977..26cc81c339f1d2dbf41385eb86884a36e31b3e28 100644 (file)
@@ -1,9 +1,16 @@
 import Benchmark from 'benny'
-import { WorkerChoiceStrategies } from '../../lib/index.mjs'
-import { PoolTypes, WorkerFunctions, WorkerTypes } from '../benchmarks-types.js'
-import { buildPool, runTest } from '../benchmarks-utils.js'
+import {
+  WorkerChoiceStrategies,
+  availableParallelism
+} from '../../lib/index.mjs'
+import {
+  PoolTypes,
+  WorkerFunctions,
+  WorkerTypes
+} from '../benchmarks-types.mjs'
+import { buildPool, runTest } from '../benchmarks-utils.mjs'
 
-const poolSize = 30
+const poolSize = availableParallelism()
 const taskExecutions = 1
 const workerData = {
   function: WorkerFunctions.jsonIntegerSerialization,