X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Ffixed-microjob.js;h=b61dcd9438b70e029cb3890adb695761e5dbebeb;hb=a05c10de598321c3ad8005f32b1cd082ec1500f5;hp=287d8a6f8948a5f164faaf20e784bf1dc6b66bbe;hpb=79e7d3680bb510d4c5419701de6638fb19816c2c;p=poolifier.git diff --git a/benchmarks/versus-external-pools/fixed-microjob.js b/benchmarks/versus-external-pools/fixed-microjob.js index 287d8a6f..b61dcd94 100644 --- a/benchmarks/versus-external-pools/fixed-microjob.js +++ b/benchmarks/versus-external-pools/fixed-microjob.js @@ -4,11 +4,12 @@ const { job, start } = require('microjob') // 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) } async function run () { @@ -20,11 +21,12 @@ async function run () { data => { functionToBench(data) }, - { data: data, ctx: { functionToBench } } + { data, ctx: { functionToBench } } ) ) } await Promise.all(promises) + // eslint-disable-next-line n/no-process-exit process.exit() }