X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fbench.mjs;h=7ef61bc6cba31225a4d8732b721422494deeb4d3;hb=9d96ba4ea0e2e4b06216657cb1641551b59f58ee;hp=3484951cfb187a42bf1af5f325cd1c436adb6baf;hpb=cde5b54ed8ffa2a288b697c3ab921a6cf7231694;p=poolifier.git diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 3484951c..7ef61bc6 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -3,11 +3,11 @@ import { WorkerTypes, availableParallelism } from '../../lib/index.mjs' -import { TaskFunctions } from '../benchmarks-types.mjs' +import { TaskFunctions } from '../benchmarks-types.js' import { buildPoolifierPool, runPoolifierPoolBenchmark -} from '../benchmarks-utils.mjs' +} from '../benchmarks-utils.js' const poolSize = availableParallelism() const taskExecutions = 1 @@ -35,3 +35,23 @@ await runPoolifierPoolBenchmark( workerData } ) + +// FixedClusterPool +await runPoolifierPoolBenchmark( + 'Poolifier FixedClusterPool', + buildPoolifierPool(WorkerTypes.cluster, PoolTypes.fixed, poolSize), + { + taskExecutions, + workerData + } +) + +// DynamicClusterPool +await runPoolifierPoolBenchmark( + 'Poolifier DynamicClusterPool', + buildPoolifierPool(WorkerTypes.cluster, PoolTypes.dynamic, poolSize), + { + taskExecutions, + workerData + } +)