Merge dependabot/npm_and_yarn/examples/typescript/smtp-client-pool/types/node-20...
[poolifier.git] / benchmarks / internal / bench.mjs
index 193827f3a24da416f58e079dd8cd546c8b50d8cd..a14ecd5f12086acf98e64cc2c877c68b0bbbf91f 100644 (file)
@@ -7,7 +7,7 @@ import {
   availableParallelism
 } from '../../lib/index.mjs'
 import { TaskFunctions } from '../benchmarks-types.mjs'
-import { buildPool, runTest } from '../benchmarks-utils.mjs'
+import { buildPoolifierPool, runPoolifierTest } from '../benchmarks-utils.mjs'
 
 const poolSize = availableParallelism()
 const pools = []
@@ -22,7 +22,7 @@ for (const poolType of Object.values(PoolTypes)) {
           for (const measurement of [Measurements.runTime, Measurements.elu]) {
             pools.push([
               `${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}|measurement:${measurement}`,
-              buildPool(workerType, poolType, poolSize, {
+              buildPoolifierPool(workerType, poolType, poolSize, {
                 workerChoiceStrategy,
                 workerChoiceStrategyOptions: {
                   measurement
@@ -34,7 +34,7 @@ for (const poolType of Object.values(PoolTypes)) {
         } else {
           pools.push([
             `${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}`,
-            buildPool(workerType, poolType, poolSize, {
+            buildPoolifierPool(workerType, poolType, poolSize, {
               workerChoiceStrategy,
               enableTasksQueue
             })
@@ -50,10 +50,10 @@ const workerData = {
   function: TaskFunctions.jsonIntegerSerialization,
   taskSize: 1000
 }
-const addPools = (pools) =>
+const addPools = pools =>
   pools.map(([name, pool]) => {
     return add(name, async () => {
-      await runTest(pool, {
+      await runPoolifierTest(pool, {
         taskExecutions,
         workerData
       })
@@ -90,4 +90,4 @@ suite(
     // eslint-disable-next-line n/no-process-exit
     return process.exit()
   })
-  .catch((err) => console.error(err))
+  .catch(err => console.error(err))