From: Jérôme Benoit Date: Sun, 25 Jun 2023 19:32:05 +0000 (+0200) Subject: refactor: remove unsupported pools X-Git-Tag: v2.6.4~23 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3b314e4d3ac8d5023266c0c2e217a98886ea9ac7;p=poolifier.git refactor: remove unsupported pools Signed-off-by: Jérôme Benoit --- diff --git a/benchmarks/README.md b/benchmarks/README.md index b2b1fb9f..8ad75e1c 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -15,7 +15,7 @@ External pools with which we compared the poolifier results: - [piscina](https://github.com/piscinajs/piscina) - [tinypool](https://github.com/tinylibs/tinypool) -- [node-worker-threads-pool](https://github.com/SUCHMOKUO/node-worker-threads-pool) +- [node-worker-threads-pool](https://github.com/SUCHMOKUO/node-worker-threads-pool): removed from the benchmark because does not support ESM modules - [workerpool](https://github.com/josdejong/workerpool) - [worker-nodes](https://github.com/allegro/node-worker-nodes) - [threads.js](https://github.com/andywer/threads.js/) diff --git a/benchmarks/versus-external-pools/functions/function-to-bench.mjs b/benchmarks/versus-external-pools/functions/function-to-bench.mjs index 32552290..fbe70229 100644 --- a/benchmarks/versus-external-pools/functions/function-to-bench.mjs +++ b/benchmarks/versus-external-pools/functions/function-to-bench.mjs @@ -1,3 +1,6 @@ +import crypto from 'crypto' +import fs from 'fs' + /** * The worker function to execute during pools benchmarks. * NOTE: This function requires to be self-contained, thread-safe and re-entrant. @@ -5,8 +8,6 @@ * @returns {*} The result. */ export default async function functionToBench (data) { - const { default: crypto } = await import('crypto') - const { default: fs } = await import('fs') const TaskTypes = { CPU_INTENSIVE: 'CPU_INTENSIVE', IO_INTENSIVE: 'IO_INTENSIVE' diff --git a/benchmarks/versus-external-pools/hyperfine_benchmarks.sh b/benchmarks/versus-external-pools/hyperfine_benchmarks.sh index 4e4996ec..bc7466d0 100755 --- a/benchmarks/versus-external-pools/hyperfine_benchmarks.sh +++ b/benchmarks/versus-external-pools/hyperfine_benchmarks.sh @@ -9,8 +9,6 @@ hyperfine --export-markdown BENCH-100000.md --min-runs 20 --prepare 'sleep 2' -- 'node dynamic-tinypool.mjs' \ 'node dynamic-workerpool.mjs' \ 'node fixed-workerpool.mjs' \ - 'node dynamic-node-worker-threads-pool.mjs' \ - 'node static-node-worker-threads-pool.mjs' \ 'node dynamic-worker-nodes.mjs' \ 'node fixed-worker-nodes.mjs' \ 'node threadjs.mjs' \