X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Fstatic-suchmokuo-node-worker-threads-pool.js;h=75f3d2a438fd3cc1b1a963e626f6b2cccecff69d;hb=8d44e09342e2785fba82782c1771b7f67ffff650;hp=ded55b882a8e66cd9bfbf0c8367e2b8de6e6eb7a;hpb=79e7d3680bb510d4c5419701de6638fb19816c2c;p=poolifier.git diff --git a/benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js b/benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js index ded55b88..75f3d2a4 100644 --- a/benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js +++ b/benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js @@ -4,15 +4,16 @@ const { StaticPool } = require('node-worker-threads-pool') // IMPORT FUNCTION TO BENCH const functionToBench = require('./functions/function-to-bench') // FINISH IMPORT FUNCTION TO BENCH -const size = Number(process.env.POOL_SIZE) -const iterations = Number(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 StaticPool({ - size: size, + size, task: functionToBench }) @@ -22,6 +23,7 @@ async function run () { promises.push(pool.exec(data)) } await Promise.all(promises) + // eslint-disable-next-line n/no-process-exit process.exit() }