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=a3ae469eebfcc990a251133beb01378599313233;hp=a418bcfcf3dbecae289fcaf594da20d06e35a66a;hpb=144f78e0cf2579cbd0a05ea30bc95ac6b57050f3;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 a418bcfc..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 @@ -4,14 +4,15 @@ const { DynamicPool } = require('node-worker-threads-pool') // 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() }