From 98f60ddd83d32e108adcfddebeb902f0d5a197eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 7 Apr 2024 18:28:36 +0200 Subject: [PATCH] chore: switch from mitata to tatami-ng MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .vscode/launch.json | 2 +- .vscode/settings.json | 2 +- benchmarks/README.md | 2 +- benchmarks/benchmarks-utils.mjs | 2 +- benchmarks/internal/bench.mjs | 2 +- benchmarks/worker-selection/round-robin.mjs | 2 +- package.json | 8 +++---- pnpm-lock.yaml | 26 +++++++++------------ 8 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 921886b8..a80e9417 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -30,7 +30,7 @@ "name": "Launch Mitata Benchmark Debug", "cwd": "${workspaceFolder}", "runtimeExecutable": "pnpm", - "runtimeArgs": ["run", "benchmark:mitata:debug"], + "runtimeArgs": ["run", "benchmark:tatami-ng:debug"], "skipFiles": ["/**"], "stopOnEntry": true } diff --git a/.vscode/settings.json b/.vscode/settings.json index ffab16b6..7d270f61 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,7 +33,7 @@ "maxdepth", "microjob", "microtime", - "mitata", + "tatami-ng", "mochawesome", "MYBENCH", "nanothreads", diff --git a/benchmarks/README.md b/benchmarks/README.md index 3468dce5..27467511 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -25,6 +25,6 @@ See the dedicated repository [README.md](https://github.com/poolifier/benchmark# To run the internal benchmark, you just need to navigate to the root of poolifier cloned repository and run: - `pnpm benchmark:benchmark.js` or -- `pnpm benchmark:mitata` +- `pnpm benchmark:tatami-ng` ### [Results](https://bencher.dev/perf/poolifier) diff --git a/benchmarks/benchmarks-utils.mjs b/benchmarks/benchmarks-utils.mjs index 06ebbfa1..85bc57fc 100644 --- a/benchmarks/benchmarks-utils.mjs +++ b/benchmarks/benchmarks-utils.mjs @@ -1,7 +1,7 @@ import { strictEqual } from 'node:assert' import Benchmark from 'benchmark' -import { bench, clear, group, run } from 'mitata' +import { bench, clear, group, run } from 'tatami-ng' import { DynamicClusterPool, diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 480998b7..125500f2 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -32,7 +32,7 @@ switch ( allowPositionals: true }).values.type ) { - case 'mitata': + case 'tatami-ng': await runPoolifierBenchmarkMitata( 'FixedThreadPool', WorkerTypes.thread, diff --git a/benchmarks/worker-selection/round-robin.mjs b/benchmarks/worker-selection/round-robin.mjs index c9366262..82892450 100644 --- a/benchmarks/worker-selection/round-robin.mjs +++ b/benchmarks/worker-selection/round-robin.mjs @@ -1,4 +1,4 @@ -import { bench, group, run } from 'mitata' +import { bench, group, run } from 'tatami-ng' function generateWorkersArray (numberOfWorkers) { return [...Array(numberOfWorkers).keys()] diff --git a/package.json b/package.json index 757f39d2..d912e6e1 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,9 @@ "benchmark:benchmark.js": "pnpm build && node --max-old-space-size=8192 --enable-source-maps benchmarks/internal/bench.mjs -t benchmark.js", "benchmark:benchmark.js:prod": "pnpm build:prod && node --max-old-space-size=8192 --enable-source-maps benchmarks/internal/bench.mjs -t benchmark.js", "benchmark:benchmark.js:debug": "pnpm build && node --max-old-space-size=8192 --enable-source-maps --inspect benchmarks/internal/bench.mjs -t benchmark.js", - "benchmark:mitata": "pnpm build && node --enable-source-maps benchmarks/internal/bench.mjs -t mitata", - "benchmark:mitata:prod": "pnpm build:prod && node --enable-source-maps benchmarks/internal/bench.mjs -t mitata", - "benchmark:mitata:debug": "pnpm build && node --enable-source-maps --inspect benchmarks/internal/bench.mjs -t mitata", + "benchmark:tatami-ng": "pnpm build && node --enable-source-maps benchmarks/internal/bench.mjs -t tatami-ng", + "benchmark:tatami-ng:prod": "pnpm build:prod && node --enable-source-maps benchmarks/internal/bench.mjs -t tatami-ng", + "benchmark:tatami-ng:debug": "pnpm build && node --enable-source-maps --inspect benchmarks/internal/bench.mjs -t tatami-ng", "test": "pnpm build --environment SOURCEMAP:false && cross-env NODE_ENV=test c8 mocha 'tests/**/*.test.mjs'", "test:debug": "pnpm build && cross-env NODE_ENV=test mocha --no-parallel --inspect 'tests/**/*.test.mjs'", "coverage": "c8 report --reporter=lcov", @@ -133,7 +133,6 @@ "husky": "^9.0.11", "lint-staged": "^15.2.2", "microtime": "^3.1.1", - "mitata": "github:poolifier/mitata#master", "mocha": "^10.4.0", "mochawesome": "^7.1.3", "prettier": "^3.2.5", @@ -144,6 +143,7 @@ "rollup-plugin-delete": "^2.0.0", "rollup-plugin-dts": "^6.1.0", "sinon": "^17.0.1", + "tatami-ng": "^0.2.0", "typedoc": "^0.25.12", "typescript": "~5.4.4" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52c72fbc..05d26a58 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,9 +95,6 @@ devDependencies: microtime: specifier: ^3.1.1 version: 3.1.1 - mitata: - specifier: github:poolifier/mitata#master - version: github.com/poolifier/mitata/5fa0fd7c17c51c4e95350a018f5c2653e2cdf8bd(typescript@5.4.4) mocha: specifier: ^10.4.0 version: 10.4.0 @@ -128,6 +125,9 @@ devDependencies: sinon: specifier: ^17.0.1 version: 17.0.1 + tatami-ng: + specifier: ^0.2.0 + version: 0.2.0(typescript@5.4.4) typedoc: specifier: ^0.25.12 version: 0.25.12(typescript@5.4.4) @@ -5316,6 +5316,14 @@ packages: engines: {node: '>=6'} dev: true + /tatami-ng@0.2.0(typescript@5.4.4): + resolution: {integrity: sha512-01WuN89KtrKcdbdpM90IazywSfNr+Cp6zjwTW/QM6z4LUqqVRJrWpbNl30qRQts2CzZElnXfVQ2rfVg08Q91ow==} + peerDependencies: + typescript: ^5.0.0 + dependencies: + typescript: 5.4.4 + dev: true + /tcomb-validation@3.4.1: resolution: {integrity: sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==} dependencies: @@ -5776,15 +5784,3 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} dev: true - - github.com/poolifier/mitata/5fa0fd7c17c51c4e95350a018f5c2653e2cdf8bd(typescript@5.4.4): - resolution: {tarball: https://codeload.github.com/poolifier/mitata/tar.gz/5fa0fd7c17c51c4e95350a018f5c2653e2cdf8bd} - id: github.com/poolifier/mitata/5fa0fd7c17c51c4e95350a018f5c2653e2cdf8bd - name: mitata - version: 0.1.11 - requiresBuild: true - peerDependencies: - typescript: ^5.0.0 - dependencies: - typescript: 5.4.4 - dev: true -- 2.34.1