X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Fdynamic-suchmokuo-node-worker-threads-pool.js;h=0a56d1fd2326555ca7804d4850efb87670a517f2;hb=14055bb78fcb17420f0429c0e6d160d6bb90a551;hp=c183e536c688235b734943e000614df13ddcd748;hpb=9f7e7a99ea7dfa6f2fb3c2e0e025b85cfdd4e22e;p=poolifier.git diff --git a/benchmarks/versus-external-pools/dynamic-suchmokuo-node-worker-threads-pool.js b/benchmarks/versus-external-pools/dynamic-suchmokuo-node-worker-threads-pool.js index c183e536..0a56d1fd 100644 --- a/benchmarks/versus-external-pools/dynamic-suchmokuo-node-worker-threads-pool.js +++ b/benchmarks/versus-external-pools/dynamic-suchmokuo-node-worker-threads-pool.js @@ -1,17 +1,18 @@ // IMPORT LIBRARIES -const { DynamicPool, StaticPool } = require('node-worker-threads-pool') +const { DynamicPool } = require('node-worker-threads-pool') // FINISH IMPORT LIBRARIES // IMPORT FUNCTION TO BENCH const functionToBench = require('./functions/function-to-bench') // FINISH IMPORT FUNCTION TO BENCH -const size = process.env.POOL_SIZE -const iterations = process.env.NUM_ITERATIONS +const size = parseInt(process.env.POOL_SIZE) +const iterations = parseInt(process.env.NUM_ITERATIONS) const data = { test: 'MYBENCH', - taskType: process.env['TASK_TYPE'] + taskType: process.env.TASK_TYPE, + taskSize: parseInt(process.env.TASK_SIZE) } -const pool = new DynamicPool(Number(size)) +const pool = new DynamicPool(size) async function run () { const promises = [] @@ -24,6 +25,7 @@ async function run () { ) } await Promise.all(promises) + // eslint-disable-next-line n/no-process-exit process.exit() }