docs: update benchmark versus external pools results
[poolifier.git] / benchmarks / versus-external-pools / dynamic-node-worker-threads-pool.mjs
index ed8285026c740b93cec25465f6c2835e9a53931f..c4be1ee1c6d1a0ca312d1597c1d8e4a48406d5fd 100644 (file)
@@ -1,5 +1,5 @@
 import { DynamicPool } from 'node-worker-threads-pool'
-import { executeAsyncFn } from '../benchmarks-utils.mjs'
+import { executeAsyncFn } from './utils.mjs'
 import functionToBench from './functions/function-to-bench.js'
 
 const size = parseInt(process.env.POOL_SIZE)
@@ -10,13 +10,13 @@ const data = {
   taskSize: parseInt(process.env.TASK_SIZE)
 }
 
-const pool = new DynamicPool(size)
+const dynamicPool = new DynamicPool(size)
 
 async function run () {
   const promises = new Set()
   for (let i = 0; i < iterations; i++) {
     promises.add(
-      pool.exec({
+      dynamicPool.exec({
         task: functionToBench,
         param: data,
         timeout: 60000 // this is the same as poolifier default