chore(deps-dev): apply updates
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 3 Oct 2024 16:40:19 +0000 (18:40 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 3 Oct 2024 16:40:19 +0000 (18:40 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
benchmarks/benchmarks-utils.mjs
benchmarks/internal/bench.mjs
package.json
pnpm-lock.yaml

index 8ba93ae73a5f6ddd07ec1d56d293a1839b5b2d30..1b1cfde53e6aaa53ed8814794aea45dec2364e30 100644 (file)
@@ -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 }
index 78f22a8451109e9f8785f899e46f0af5c150ae3b..b11eb73be878ea78305f23e394af32f186da1380 100644 (file)
@@ -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,
index 603f45e3255a4a69d8caab78efab04fccd9cc65b..8c7c2e46ed54a2f633ce9b974322d6b9cf7db7b8 100644 (file)
     "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"
   }
index 0cbb92adfae320e096a9e0be37614a1336e9ab2d..e20f0a4f8765a7cf569c4aaa69af0fe239bacb6d 100644 (file)
@@ -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