X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fbenchmarks-utils.mjs;h=c88ada12fa61eda4c474b4142bbd81dbb59ae06d;hb=a109e1c64ce3cff450fa79aebfa4de0ac3662be9;hp=225143f1a1b4d1d483342ad19903e0f4affaec07;hpb=bac873bd6581e5d5c0884bc520e9ec3c446509e6;p=poolifier.git diff --git a/benchmarks/benchmarks-utils.mjs b/benchmarks/benchmarks-utils.mjs index 225143f1..c88ada12 100644 --- a/benchmarks/benchmarks-utils.mjs +++ b/benchmarks/benchmarks-utils.mjs @@ -51,6 +51,7 @@ const jsonIntegerSerialization = n => { } JSON.stringify(o) } + return { ok: 1 } } /** @@ -94,6 +95,7 @@ const readWriteFiles = ( fs.readFileSync(filePath, 'utf8') } fs.rmSync(baseDirectory, { recursive: true }) + return { ok: 1 } } export const executeWorkerFunction = data => { @@ -133,15 +135,15 @@ export const buildPool = (workerType, poolType, poolSize, poolOptions) => { switch (workerType) { case WorkerTypes.thread: return new DynamicThreadPool( - poolSize / 2, - poolSize * 3, + Math.floor(poolSize / 2), + poolSize, './benchmarks/internal/thread-worker.mjs', poolOptions ) case WorkerTypes.cluster: return new DynamicClusterPool( - poolSize / 2, - poolSize * 3, + Math.floor(poolSize / 2), + poolSize, './benchmarks/internal/cluster-worker.mjs', poolOptions )