X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Ffixed-poolifier.js;h=2a5e599ab11aefc0948bb8ec208f3650ede4e02f;hb=47701542af9fc4a44dbe30018ec42860b5fac98c;hp=e32a1166f63847a45933209fa3bd71d3a1c43e00;hpb=3474e5d3a5305a3fe249d64d98759986864b51da;p=poolifier.git diff --git a/benchmarks/versus-external-pools/fixed-poolifier.js b/benchmarks/versus-external-pools/fixed-poolifier.js index e32a1166..2a5e599a 100644 --- a/benchmarks/versus-external-pools/fixed-poolifier.js +++ b/benchmarks/versus-external-pools/fixed-poolifier.js @@ -1,15 +1,16 @@ // IMPORT LIBRARIES -const { FixedThreadPool, DynamicThreadPool } = require('poolifier') +const { FixedThreadPool } = require('poolifier') // FINISH IMPORT LIBRARIES -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 fixedPool = new FixedThreadPool( - Number(size), + size, './workers/poolifier/function-to-bench-worker.js' ) @@ -19,6 +20,7 @@ async function run () { promises.push(fixedPool.execute(data)) } await Promise.all(promises) + // eslint-disable-next-line n/no-process-exit process.exit() }