From ca6c7d70082311f3cc503090cf507ce36582b9b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 24 Oct 2022 12:43:45 +0200 Subject: [PATCH] Switch internal benchmarking code to benny. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .eslintrc.js | 1 + .gitignore | 3 +- CHANGELOG.md | 4 + benchmarks/benchmarks-utils.js | 8 +- benchmarks/internal/bench.js | 148 +++++++------- benchmarks/worker-selection/lru.js | 55 ++--- benchmarks/worker-selection/round-robin.js | 38 ++-- package-lock.json | 226 ++++++++++++++++++++- package.json | 2 +- 9 files changed, 337 insertions(+), 148 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f0f371e0..fd8a538d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,6 +34,7 @@ module.exports = defineConfig({ 'warn', { skipWords: [ + 'benny', 'browserslist', 'builtins', 'christopher', diff --git a/.gitignore b/.gitignore index 99b9a2c2..a1a9fd96 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,5 @@ build/config.gypi .scannerwork *.bak lib -reports +reports/ +benchmarks/internal/results/ diff --git a/CHANGELOG.md b/CHANGELOG.md index e4fbb015..87c17844 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Switch internal benchmarking code to benny. + ## [2.3.7] - 2022-10-23 ### Changed diff --git a/benchmarks/benchmarks-utils.js b/benchmarks/benchmarks-utils.js index 30af25c9..62613c7e 100644 --- a/benchmarks/benchmarks-utils.js +++ b/benchmarks/benchmarks-utils.js @@ -9,7 +9,7 @@ async function runPoolifierTest (pool, { tasks, workerData }) { .then(() => { executions++ if (executions === tasks) { - return resolve('FINISH') + return resolve({ ok: 1 }) } return null }) @@ -77,13 +77,7 @@ function executeWorkerFunction (data) { } } -const LIST_FORMATTER = new Intl.ListFormat('en-US', { - style: 'long', - type: 'conjunction' -}) - module.exports = { - LIST_FORMATTER, WorkerFunctions, executeWorkerFunction, generateRandomInteger, diff --git a/benchmarks/internal/bench.js b/benchmarks/internal/bench.js index f3a1eb4f..faf09393 100644 --- a/benchmarks/internal/bench.js +++ b/benchmarks/internal/bench.js @@ -1,4 +1,4 @@ -const Benchmark = require('benchmark') +const Benchmark = require('benny') const { dynamicClusterTest, dynamicClusterTestFairShare, @@ -23,77 +23,81 @@ const { fixedThreadTestLessRecentlyUsed, fixedThreadTestWeightedRoundRobin } = require('./thread/fixed') -const { LIST_FORMATTER } = require('../benchmarks-utils') -const suite = new Benchmark.Suite('poolifier') +const resultsFile = 'poolifier' +const resultsFolder = 'benchmarks/internal/results' -// Wait some seconds before start, pools need to load threads !!! -setTimeout(async () => { - test() -}, 3000) - -async function test () { - // Add tests - suite - .add('Poolifier:Fixed:ThreadPool', async function () { - await fixedThreadTest() - }) - .add('Poolifier:Fixed:ThreadPool:LessRecentlyUsed', async function () { - await fixedThreadTestLessRecentlyUsed() - }) - .add('Poolifier:Fixed:ThreadPool:WeightedRoundRobin', async function () { - await fixedThreadTestWeightedRoundRobin() - }) - .add('Poolifier:Fixed:ThreadPool:FairShare', async function () { - await fixedThreadTestFairShare() - }) - .add('Poolifier:Dynamic:ThreadPool', async function () { - await dynamicThreadTest() - }) - .add('Poolifier:Dynamic:ThreadPool:LessRecentlyUsed', async function () { - await dynamicThreadTestLessRecentlyUsed() - }) - .add('Poolifier:Dynamic:ThreadPool:WeightedRoundRobin', async function () { - await dynamicThreadTestWeightedRoundRobin() - }) - .add('Poolifier:Dynamic:ThreadPool:FairShare', async function () { - await dynamicThreadTestFairShare() - }) - .add('Poolifier:Fixed:ClusterPool', async function () { - await fixedClusterTest() - }) - .add('Poolifier:Fixed:ClusterPool:LessRecentlyUsed', async function () { - await fixedClusterTestLessRecentlyUsed() - }) - .add('Poolifier:Fixed:ClusterPool:WeightedRoundRobin', async function () { - await fixedClusterTestWeightedRoundRobin - }) - .add('Poolifier:Fixed:ClusterPool:FairShare', async function () { - await fixedClusterTestFairShare() - }) - .add('Poolifier:Dynamic:ClusterPool', async function () { - await dynamicClusterTest() - }) - .add('Poolifier:Dynamic:ClusterPool:LessRecentlyUsed', async function () { - await dynamicClusterTestLessRecentlyUsed() - }) - .add('Poolifier:Dynamic:ClusterPool:WeightedRoundRobin', async function () { +Benchmark.suite( + 'Poolifier', + Benchmark.add('Poolifier:Fixed:ThreadPool', async () => { + await fixedThreadTest() + }), + Benchmark.add('Poolifier:Fixed:ThreadPool:LessRecentlyUsed', async () => { + await fixedThreadTestLessRecentlyUsed() + }), + Benchmark.add('Poolifier:Fixed:ThreadPool:WeightedRoundRobin', async () => { + await fixedThreadTestWeightedRoundRobin() + }), + Benchmark.add('Poolifier:Fixed:ThreadPool:FairShare', async () => { + await fixedThreadTestFairShare() + }), + Benchmark.add('Poolifier:Dynamic:ThreadPool', async () => { + await dynamicThreadTest() + }), + Benchmark.add('Poolifier:Dynamic:ThreadPool:LessRecentlyUsed', async () => { + await dynamicThreadTestLessRecentlyUsed() + }), + Benchmark.add('Poolifier:Dynamic:ThreadPool:WeightedRoundRobin', async () => { + await dynamicThreadTestWeightedRoundRobin() + }), + Benchmark.add('Poolifier:Dynamic:ThreadPool:FairShare', async () => { + await dynamicThreadTestFairShare() + }), + Benchmark.add('Poolifier:Fixed:ClusterPool', async () => { + await fixedClusterTest() + }), + Benchmark.add('Poolifier:Fixed:ClusterPool:LessRecentlyUsed', async () => { + await fixedClusterTestLessRecentlyUsed() + }), + Benchmark.add('Poolifier:Fixed:ClusterPool:WeightedRoundRobin', async () => { + await fixedClusterTestWeightedRoundRobin + }), + Benchmark.add('Poolifier:Fixed:ClusterPool:FairShare', async () => { + await fixedClusterTestFairShare() + }), + Benchmark.add('Poolifier:Dynamic:ClusterPool', async () => { + await dynamicClusterTest() + }), + Benchmark.add('Poolifier:Dynamic:ClusterPool:LessRecentlyUsed', async () => { + await dynamicClusterTestLessRecentlyUsed() + }), + Benchmark.add( + 'Poolifier:Dynamic:ClusterPool:WeightedRoundRobin', + async () => { await dynamicClusterTestWeightedRoundRobin - }) - .add('Poolifier:Dynamic:ClusterPool:FairShare', async function () { - await dynamicClusterTestFairShare() - }) - // Add listeners - .on('cycle', function (event) { - console.log(event.target.toString()) - }) - .on('complete', function () { - console.log( - 'Fastest is ' + - LIST_FORMATTER.format(this.filter('fastest').map('name')) - ) - // eslint-disable-next-line n/no-process-exit - process.exit() - }) - .run({ async: true }) -} + } + ), + Benchmark.add('Poolifier:Dynamic:ClusterPool:FairShare', async () => { + await dynamicClusterTestFairShare() + }), + Benchmark.cycle(), + Benchmark.complete(), + Benchmark.save({ + file: resultsFile, + folder: resultsFolder, + format: 'json', + details: true + }), + Benchmark.save({ + file: resultsFile, + folder: resultsFolder, + format: 'chart.html', + details: true + }), + Benchmark.save({ + file: resultsFile, + folder: resultsFolder, + format: 'table.html', + details: true + }) +) diff --git a/benchmarks/worker-selection/lru.js b/benchmarks/worker-selection/lru.js index e60c8415..90628d3a 100644 --- a/benchmarks/worker-selection/lru.js +++ b/benchmarks/worker-selection/lru.js @@ -1,7 +1,5 @@ -const Benchmark = require('benchmark') -const { generateRandomInteger, LIST_FORMATTER } = require('../benchmarks-utils') - -const suite = new Benchmark.Suite() +const Benchmark = require('benny') +const { generateRandomInteger } = require('../benchmarks-utils') function generateRandomTasksMap ( numberOfWorkers, @@ -169,41 +167,26 @@ function quickSelectRecursionRandomPivot (tasksMap) { ) } -// console.log(Array.from(tasksMap)) -// console.log(loopSelect(tasksMap)) -// console.log(arraySortSelect(tasksMap)) -// console.log(quickSelectLoop(tasksMap)) -// console.log(quickSelectLoopRandomPivot(tasksMap)) -// console.log(quickSelectRecursion(tasksMap)) -// console.log(quickSelectRecursionRandomPivot(tasksMap)) - -suite - .add('Loop select', function () { +Benchmark.suite( + 'Tasks selection', + Benchmark.add('Loop select', () => { loopSelect(tasksMap) - }) - .add('Array sort select', function () { + }), + Benchmark.add('Array sort select', () => { arraySortSelect(tasksMap) - }) - .add('Quick select loop', function () { + }), + Benchmark.add('Quick select loop', () => { quickSelectLoop(tasksMap) - }) - .add('Quick select loop with random pivot', function () { + }), + Benchmark.add('Quick select loop with random pivot', () => { quickSelectLoopRandomPivot(tasksMap) - }) - .add('Quick select recursion', function () { + }), + Benchmark.add('Quick select recursion', () => { quickSelectRecursion(tasksMap) - }) - .add('Quick select recursion with random pivot', function () { + }), + Benchmark.add('Quick select recursion with random pivot', () => { quickSelectRecursionRandomPivot(tasksMap) - }) - .on('cycle', function (event) { - console.log(event.target.toString()) - }) - .on('complete', function () { - console.log( - 'Fastest is ' + LIST_FORMATTER.format(this.filter('fastest').map('name')) - ) - // eslint-disable-next-line n/no-process-exit - process.exit() - }) - .run() + }), + Benchmark.cycle(), + Benchmark.complete() +) diff --git a/benchmarks/worker-selection/round-robin.js b/benchmarks/worker-selection/round-robin.js index 0e391a98..0b8b9ec2 100644 --- a/benchmarks/worker-selection/round-robin.js +++ b/benchmarks/worker-selection/round-robin.js @@ -1,7 +1,4 @@ -const Benchmark = require('benchmark') -const { LIST_FORMATTER } = require('../benchmarks-utils') - -const suite = new Benchmark.Suite() +const Benchmark = require('benny') function generateWorkersArray (numberOfWorkers) { return [...Array(numberOfWorkers).keys()] @@ -39,31 +36,24 @@ function roundRobinIncrementModulo () { return chosenWorker } -suite - .add('Ternary off by one', function () { +Benchmark.suite( + 'Less recently used', + Benchmark.add('Ternary off by one', () => { nextWorkerIndex = 0 roundRobinTernaryOffByOne() - }) - .add('Ternary with negation', function () { + }), + Benchmark.add('Ternary with negation', () => { nextWorkerIndex = 0 roundRobinTernaryWithNegation() - }) - .add('Ternary with pre-choosing', function () { + }), + Benchmark.add('Ternary with pre-choosing', () => { nextWorkerIndex = 0 roundRobinTernaryWithPreChoosing() - }) - .add('Increment+Modulo', function () { + }), + Benchmark.add('Increment+Modulo', () => { nextWorkerIndex = 0 roundRobinIncrementModulo() - }) - .on('cycle', function (event) { - console.log(event.target.toString()) - }) - .on('complete', function () { - console.log( - 'Fastest is ' + LIST_FORMATTER.format(this.filter('fastest').map('name')) - ) - // eslint-disable-next-line n/no-process-exit - process.exit() - }) - .run() + }), + Benchmark.cycle(), + Benchmark.complete() +) diff --git a/package-lock.json b/package-lock.json index 99f512b7..b8be8356 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@types/node": "^18.11.3", "@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^5.40.1", - "benchmark": "^2.1.4", + "benny": "^3.7.1", "c8": "^7.12.0", "eslint": "^8.26.0", "eslint-config-standard": "^17.0.0", @@ -65,6 +65,48 @@ "node": ">=6.0.0" } }, + "node_modules/@arrows/array": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@arrows/array/-/array-1.4.1.tgz", + "integrity": "sha512-MGYS8xi3c4tTy1ivhrVntFvufoNzje0PchjEz6G/SsWRgUKxL4tKwS6iPdO8vsaJYldagAeWMd5KRD0aX3Q39g==", + "dev": true, + "dependencies": { + "@arrows/composition": "^1.2.2" + } + }, + "node_modules/@arrows/composition": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@arrows/composition/-/composition-1.2.2.tgz", + "integrity": "sha512-9fh1yHwrx32lundiB3SlZ/VwuStPB4QakPsSLrGJFH6rCXvdrd060ivAZ7/2vlqPnEjBkPRRXOcG1YOu19p2GQ==", + "dev": true + }, + "node_modules/@arrows/dispatch": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@arrows/dispatch/-/dispatch-1.0.3.tgz", + "integrity": "sha512-v/HwvrFonitYZM2PmBlAlCqVqxrkIIoiEuy5bQgn0BdfvlL0ooSBzcPzTMrtzY8eYktPyYcHg8fLbSgyybXEqw==", + "dev": true, + "dependencies": { + "@arrows/composition": "^1.2.2" + } + }, + "node_modules/@arrows/error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@arrows/error/-/error-1.0.2.tgz", + "integrity": "sha512-yvkiv1ay4Z3+Z6oQsUkedsQm5aFdyPpkBUQs8vejazU/RmANABx6bMMcBPPHI4aW43VPQmXFfBzr/4FExwWTEA==", + "dev": true + }, + "node_modules/@arrows/multimethod": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@arrows/multimethod/-/multimethod-1.4.1.tgz", + "integrity": "sha512-AZnAay0dgPnCJxn3We5uKiB88VL+1ZIF2SjZohLj6vqY2UyvB/sKdDnFP+LZNVsTC5lcnGPmLlRRkAh4sXkXsQ==", + "dev": true, + "dependencies": { + "@arrows/array": "^1.4.1", + "@arrows/composition": "^1.2.2", + "@arrows/error": "^1.0.2", + "fast-deep-equal": "^3.1.3" + } + }, "node_modules/@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -1118,9 +1160,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.11.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.3.tgz", - "integrity": "sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A==", + "version": "18.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", + "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==", "dev": true }, "node_modules/@types/object-path": { @@ -1689,6 +1731,26 @@ "platform": "^1.3.3" } }, + "node_modules/benny": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/benny/-/benny-3.7.1.tgz", + "integrity": "sha512-USzYxODdVfOS7JuQq/L0naxB788dWCiUgUTxvN+WLPt/JfcDURNNj8kN/N+uK6PDvuR67/9/55cVKGPleFQINA==", + "dev": true, + "dependencies": { + "@arrows/composition": "^1.0.0", + "@arrows/dispatch": "^1.0.2", + "@arrows/multimethod": "^1.1.6", + "benchmark": "^2.1.4", + "common-tags": "^1.8.0", + "fs-extra": "^10.0.0", + "json2csv": "^5.0.6", + "kleur": "^4.1.4", + "log-update": "^4.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -2432,6 +2494,15 @@ "node": ">= 12.0.0" } }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/compatfactory": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-1.0.1.tgz", @@ -5756,6 +5827,33 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, + "node_modules/json2csv": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/json2csv/-/json2csv-5.0.7.tgz", + "integrity": "sha512-YRZbUnyaJZLZUJSRi2G/MqahCyRv9n/ds+4oIetjDF3jWQA7AG7iSeKTiZiCNqtMZM7HDyt0e/W6lEnoGEmMGA==", + "dev": true, + "dependencies": { + "commander": "^6.1.0", + "jsonparse": "^1.3.1", + "lodash.get": "^4.4.2" + }, + "bin": { + "json2csv": "bin/json2csv.js" + }, + "engines": { + "node": ">= 10", + "npm": ">= 6.13.0" + } + }, + "node_modules/json2csv/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -5786,6 +5884,15 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, "node_modules/jsx-ast-utils": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", @@ -5814,6 +5921,15 @@ "json-buffer": "3.0.1" } }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/latest-version": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", @@ -9863,6 +9979,48 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, + "@arrows/array": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@arrows/array/-/array-1.4.1.tgz", + "integrity": "sha512-MGYS8xi3c4tTy1ivhrVntFvufoNzje0PchjEz6G/SsWRgUKxL4tKwS6iPdO8vsaJYldagAeWMd5KRD0aX3Q39g==", + "dev": true, + "requires": { + "@arrows/composition": "^1.2.2" + } + }, + "@arrows/composition": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@arrows/composition/-/composition-1.2.2.tgz", + "integrity": "sha512-9fh1yHwrx32lundiB3SlZ/VwuStPB4QakPsSLrGJFH6rCXvdrd060ivAZ7/2vlqPnEjBkPRRXOcG1YOu19p2GQ==", + "dev": true + }, + "@arrows/dispatch": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@arrows/dispatch/-/dispatch-1.0.3.tgz", + "integrity": "sha512-v/HwvrFonitYZM2PmBlAlCqVqxrkIIoiEuy5bQgn0BdfvlL0ooSBzcPzTMrtzY8eYktPyYcHg8fLbSgyybXEqw==", + "dev": true, + "requires": { + "@arrows/composition": "^1.2.2" + } + }, + "@arrows/error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@arrows/error/-/error-1.0.2.tgz", + "integrity": "sha512-yvkiv1ay4Z3+Z6oQsUkedsQm5aFdyPpkBUQs8vejazU/RmANABx6bMMcBPPHI4aW43VPQmXFfBzr/4FExwWTEA==", + "dev": true + }, + "@arrows/multimethod": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@arrows/multimethod/-/multimethod-1.4.1.tgz", + "integrity": "sha512-AZnAay0dgPnCJxn3We5uKiB88VL+1ZIF2SjZohLj6vqY2UyvB/sKdDnFP+LZNVsTC5lcnGPmLlRRkAh4sXkXsQ==", + "dev": true, + "requires": { + "@arrows/array": "^1.4.1", + "@arrows/composition": "^1.2.2", + "@arrows/error": "^1.0.2", + "fast-deep-equal": "^3.1.3" + } + }, "@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -10701,9 +10859,9 @@ "dev": true }, "@types/node": { - "version": "18.11.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.3.tgz", - "integrity": "sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A==", + "version": "18.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", + "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==", "dev": true }, "@types/object-path": { @@ -11088,6 +11246,23 @@ "platform": "^1.3.3" } }, + "benny": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/benny/-/benny-3.7.1.tgz", + "integrity": "sha512-USzYxODdVfOS7JuQq/L0naxB788dWCiUgUTxvN+WLPt/JfcDURNNj8kN/N+uK6PDvuR67/9/55cVKGPleFQINA==", + "dev": true, + "requires": { + "@arrows/composition": "^1.0.0", + "@arrows/dispatch": "^1.0.2", + "@arrows/multimethod": "^1.1.6", + "benchmark": "^2.1.4", + "common-tags": "^1.8.0", + "fs-extra": "^10.0.0", + "json2csv": "^5.0.6", + "kleur": "^4.1.4", + "log-update": "^4.0.0" + } + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -11590,6 +11765,12 @@ "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", "dev": true }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, "compatfactory": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-1.0.1.tgz", @@ -13980,6 +14161,25 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, + "json2csv": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/json2csv/-/json2csv-5.0.7.tgz", + "integrity": "sha512-YRZbUnyaJZLZUJSRi2G/MqahCyRv9n/ds+4oIetjDF3jWQA7AG7iSeKTiZiCNqtMZM7HDyt0e/W6lEnoGEmMGA==", + "dev": true, + "requires": { + "commander": "^6.1.0", + "jsonparse": "^1.3.1", + "lodash.get": "^4.4.2" + }, + "dependencies": { + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + } + } + }, "json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -14002,6 +14202,12 @@ "universalify": "^2.0.0" } }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true + }, "jsx-ast-utils": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", @@ -14027,6 +14233,12 @@ "json-buffer": "3.0.1" } }, + "kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true + }, "latest-version": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", diff --git a/package.json b/package.json index 0561bb50..1583b56c 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@types/node": "^18.11.3", "@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^5.40.1", - "benchmark": "^2.1.4", + "benny": "^3.7.1", "c8": "^7.12.0", "eslint": "^8.26.0", "eslint-config-standard": "^17.0.0", -- 2.34.1