From 2ebea1dce5e792478acf59e7b650984a96fe4c7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 3 Oct 2024 18:40:19 +0200 Subject: [PATCH] chore(deps-dev): apply updates MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- benchmarks/benchmarks-utils.mjs | 23 ----------------------- benchmarks/internal/bench.mjs | 14 ++++++-------- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 4 files changed, 12 insertions(+), 37 deletions(-) diff --git a/benchmarks/benchmarks-utils.mjs b/benchmarks/benchmarks-utils.mjs index 8ba93ae7..1b1cfde5 100644 --- a/benchmarks/benchmarks-utils.mjs +++ b/benchmarks/benchmarks-utils.mjs @@ -138,27 +138,4 @@ export const runPoolifierBenchmarkTatamiNg = async ( } } -export const convertTatamiNgToBmf = report => { - return report.benchmarks - .map(({ name, stats }) => { - // https://en.wikipedia.org/wiki/Propagation_of_uncertainty#Example_formulae - const throughputSd = (1e9 * stats?.sd) / stats?.avg ** 2 - return { - [name]: { - latency: { - lower_value: stats?.avg - stats?.sd, - upper_value: stats?.avg + stats?.sd, - value: stats?.avg, - }, - throughput: { - lower_value: stats?.iters - throughputSd, - upper_value: stats?.iters + throughputSd, - value: stats?.iters, - }, - }, - } - }) - .reduce((obj, item) => Object.assign(obj, item), {}) -} - export { executeTaskFunction } diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 78f22a84..b11eb73b 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -2,6 +2,7 @@ import { writeFileSync } from 'node:fs' import { env } from 'node:process' // eslint-disable-next-line n/no-unsupported-features/node-builtins import { parseArgs } from 'node:util' +import { bmf } from 'tatami-ng' import { availableParallelism, @@ -9,10 +10,7 @@ import { WorkerTypes, } from '../../lib/index.mjs' import { TaskFunctions } from '../benchmarks-types.cjs' -import { - convertTatamiNgToBmf, - runPoolifierBenchmarkTatamiNg, -} from '../benchmarks-utils.mjs' +import { runPoolifierBenchmarkTatamiNg } from '../benchmarks-utils.mjs' const poolSize = availableParallelism() const taskExecutions = 1 @@ -38,7 +36,7 @@ switch ( ) { case 'tatami-ng': default: - benchmarkReport = convertTatamiNgToBmf( + benchmarkReport = bmf( await runPoolifierBenchmarkTatamiNg( 'FixedThreadPool', WorkerTypes.thread, @@ -52,7 +50,7 @@ switch ( ) benchmarkReport = { ...benchmarkReport, - ...convertTatamiNgToBmf( + ...bmf( await runPoolifierBenchmarkTatamiNg( 'DynamicThreadPool', WorkerTypes.thread, @@ -67,7 +65,7 @@ switch ( } benchmarkReport = { ...benchmarkReport, - ...convertTatamiNgToBmf( + ...bmf( await runPoolifierBenchmarkTatamiNg( 'FixedClusterPool', WorkerTypes.cluster, @@ -82,7 +80,7 @@ switch ( } benchmarkReport = { ...benchmarkReport, - ...convertTatamiNgToBmf( + ...bmf( await runPoolifierBenchmarkTatamiNg( 'DynamicClusterPool', WorkerTypes.cluster, diff --git a/package.json b/package.json index 603f45e3..8c7c2e46 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "rollup-plugin-delete": "^2.1.0", "rollup-plugin-dts": "^6.1.1", "sinon": "^19.0.2", - "tatami-ng": "^0.7.3", + "tatami-ng": "^0.7.4", "typedoc": "^0.26.7", "typescript": "~5.6.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0cbb92ad..e20f0a4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,8 +96,8 @@ importers: specifier: ^19.0.2 version: 19.0.2 tatami-ng: - specifier: ^0.7.3 - version: 0.7.3(typescript@5.6.2) + specifier: ^0.7.4 + version: 0.7.4(typescript@5.6.2) typedoc: specifier: ^0.26.7 version: 0.26.7(typescript@5.6.2) @@ -2564,8 +2564,8 @@ packages: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - tatami-ng@0.7.3: - resolution: {integrity: sha512-Q3ADpJH/QpL83Rg/gW8nc/BUZS5nkt4CR5CYPhiutsm8OiRtZlNA3+hk+kiUMsAbXNZ97vUPpQQrRqo0bLHCpQ==} + tatami-ng@0.7.4: + resolution: {integrity: sha512-i1ZcyYi0rnHIPf8Pp45HxZBm3UQe5lzThoM4RPaG4tVnmkXCZTVovEwoRFUp7rxfZwQpOGCH+lX63cnmAw70aA==} hasBin: true peerDependencies: typescript: ^5.4.3 @@ -5535,7 +5535,7 @@ snapshots: tapable@2.2.1: {} - tatami-ng@0.7.3(typescript@5.6.2): + tatami-ng@0.7.4(typescript@5.6.2): dependencies: peowly: 1.3.2 typescript: 5.6.2 -- 2.34.1