X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fbench.mjs;h=88868af7c43c1c3e4e5cce039f2fac71a6b99946;hb=43f8444644bd23ed8b01e7bbb386a51a6144fff8;hp=368cf29c949f487b3223b5dd90c74beedcd359d1;hpb=49d60f11b30f7cdc9aca21379272a9ae89abe927;p=poolifier.git diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 368cf29c..88868af7 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -1,10 +1,11 @@ +import { exit } from 'node:process' import { PoolTypes, WorkerTypes, availableParallelism } from '../../lib/index.mjs' -import { TaskFunctions } from '../benchmarks-types.js' -import { runPoolifierPoolBenchmark } from '../benchmarks-utils.js' +import { TaskFunctions } from '../benchmarks-types.cjs' +import { runPoolifierPoolBenchmark } from '../benchmarks-utils.cjs' const poolSize = availableParallelism() const taskExecutions = 1 @@ -15,7 +16,7 @@ const workerData = { // FixedThreadPool await runPoolifierPoolBenchmark( - 'Poolifier FixedThreadPool', + 'FixedThreadPool', WorkerTypes.thread, PoolTypes.fixed, poolSize, @@ -27,7 +28,7 @@ await runPoolifierPoolBenchmark( // DynamicThreadPool await runPoolifierPoolBenchmark( - 'Poolifier DynamicThreadPool', + 'DynamicThreadPool', WorkerTypes.thread, PoolTypes.dynamic, poolSize, @@ -39,7 +40,7 @@ await runPoolifierPoolBenchmark( // FixedClusterPool await runPoolifierPoolBenchmark( - 'Poolifier FixedClusterPool', + 'FixedClusterPool', WorkerTypes.cluster, PoolTypes.fixed, poolSize, @@ -51,7 +52,7 @@ await runPoolifierPoolBenchmark( // DynamicClusterPool await runPoolifierPoolBenchmark( - 'Poolifier DynamicClusterPool', + 'DynamicClusterPool', WorkerTypes.cluster, PoolTypes.dynamic, poolSize, @@ -60,3 +61,5 @@ await runPoolifierPoolBenchmark( workerData } ) + +exit()