filename: './workers/piscina/function-to-bench-worker.js',
minThreads: size,
maxThreads: size * 3,
- idleTimeout: 1000 * 60 // this is the same as poolifier default
+ idleTimeout: 60000 // this is the same as poolifier default
})
async function run () {
const promises = []
for (let i = 0; i < iterations; i++) {
- promises.push(piscina.runTask(data))
+ promises.push(piscina.run(data))
}
await Promise.all(promises)
process.exit()