X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fbench.mjs;h=5ea11e18414b6f9c474a32ec92c0eba3d0538cb1;hb=55d7d6002049be09a06b08da26febe2e8bfa494b;hp=7ef61bc6cba31225a4d8732b721422494deeb4d3;hpb=ab7bb4f826a86d6d121b8902d6449f9fc4e59d70;p=poolifier.git diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 7ef61bc6..5ea11e18 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -1,13 +1,11 @@ +import { exit } from 'node:process' import { PoolTypes, WorkerTypes, availableParallelism } from '../../lib/index.mjs' import { TaskFunctions } from '../benchmarks-types.js' -import { - buildPoolifierPool, - runPoolifierPoolBenchmark -} from '../benchmarks-utils.js' +import { runPoolifierPoolBenchmark } from '../benchmarks-utils.js' const poolSize = availableParallelism() const taskExecutions = 1 @@ -18,8 +16,10 @@ const workerData = { // FixedThreadPool await runPoolifierPoolBenchmark( - 'Poolifier FixedThreadPool', - buildPoolifierPool(WorkerTypes.thread, PoolTypes.fixed, poolSize), + 'FixedThreadPool', + WorkerTypes.thread, + PoolTypes.fixed, + poolSize, { taskExecutions, workerData @@ -28,8 +28,10 @@ await runPoolifierPoolBenchmark( // DynamicThreadPool await runPoolifierPoolBenchmark( - 'Poolifier DynamicThreadPool', - buildPoolifierPool(WorkerTypes.thread, PoolTypes.dynamic, poolSize), + 'DynamicThreadPool', + WorkerTypes.thread, + PoolTypes.dynamic, + poolSize, { taskExecutions, workerData @@ -38,8 +40,10 @@ await runPoolifierPoolBenchmark( // FixedClusterPool await runPoolifierPoolBenchmark( - 'Poolifier FixedClusterPool', - buildPoolifierPool(WorkerTypes.cluster, PoolTypes.fixed, poolSize), + 'FixedClusterPool', + WorkerTypes.cluster, + PoolTypes.fixed, + poolSize, { taskExecutions, workerData @@ -48,10 +52,14 @@ await runPoolifierPoolBenchmark( // DynamicClusterPool await runPoolifierPoolBenchmark( - 'Poolifier DynamicClusterPool', - buildPoolifierPool(WorkerTypes.cluster, PoolTypes.dynamic, poolSize), + 'DynamicClusterPool', + WorkerTypes.cluster, + PoolTypes.dynamic, + poolSize, { taskExecutions, workerData } ) + +exit()