// IMPORT LIBRARIES
-const { FixedThreadPool, DynamicThreadPool } = require('poolifier')
+const { DynamicThreadPool } = require('poolifier')
// FINISH IMPORT LIBRARIES
-const size = process.env.POOL_SIZE
-const iterations = process.env.NUM_ITERATIONS
+const size = Number(process.env.POOL_SIZE)
+const iterations = Number(process.env.NUM_ITERATIONS)
const data = {
- test: 'MYBENCH'
+ test: 'MYBENCH',
+ taskType: process.env['TASK_TYPE']
}
const dynamicPool = new DynamicThreadPool(
size,
size * 3,
- './workers/poolifier/json-stringify.worker.js',
- {
- maxTasks: 10000
- }
+ './workers/poolifier/function-to-bench-worker.js'
)
async function run () {