X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fbench.mjs;h=8bae6aaf7794ce3d181547a1401ca87455be2c02;hb=862503b9f2480d51bf3a666fc4d1d2a9b3c06b33;hp=0e3ee055a474e5a439c5a9b1fcde3de218271193;hpb=8f01ffbe12f90c234fe5acb12932b752c56905ef;p=poolifier.git diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 0e3ee055..8bae6aaf 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -1,24 +1,24 @@ import { writeFileSync } from 'node:fs' -import { env, exit } from 'node:process' +import { env } from 'node:process' // eslint-disable-next-line n/no-unsupported-features/node-builtins import { parseArgs } from 'node:util' import { availableParallelism, PoolTypes, - WorkerTypes + WorkerTypes, } from '../../lib/index.mjs' import { TaskFunctions } from '../benchmarks-types.cjs' import { convertTatamiNgToBmf, - runPoolifierBenchmarkTatamiNg + runPoolifierBenchmarkTatamiNg, } from '../benchmarks-utils.mjs' const poolSize = availableParallelism() const taskExecutions = 1 const workerData = { function: TaskFunctions.factorial, - taskSize: 1000 + taskSize: 1000, } const benchmarkReportFile = 'benchmark-report.json' let benchmarkReport @@ -29,11 +29,11 @@ switch ( options: { type: { type: 'string', - short: 't' - } + short: 't', + }, }, strict: true, - allowPositionals: true + allowPositionals: true, }).values.type ) { case 'tatami-ng': @@ -46,7 +46,7 @@ switch ( poolSize, { taskExecutions, - workerData + workerData, } ) ) @@ -60,10 +60,10 @@ switch ( poolSize, { taskExecutions, - workerData + workerData, } ) - ) + ), } benchmarkReport = { ...benchmarkReport, @@ -75,10 +75,10 @@ switch ( poolSize, { taskExecutions, - workerData + workerData, } ) - ) + ), } benchmarkReport = { ...benchmarkReport, @@ -90,14 +90,13 @@ switch ( poolSize, { taskExecutions, - workerData + workerData, } ) - ) + ), } + // eslint-disable-next-line @typescript-eslint/no-unused-expressions env.CI != null && writeFileSync(benchmarkReportFile, JSON.stringify(benchmarkReport)) break } - -exit()