perf: workaround issue with cluster module and ESM
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 23 Jul 2023 18:11:00 +0000 (20:11 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 23 Jul 2023 18:11:00 +0000 (20:11 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
benchmarks/internal/bench.mjs

index 1fba608aa22d4f684f78cd7ab75baf4ba9e4cfac..e6ee80b65dcf8e504b70dc04d421548831f38d7a 100644 (file)
@@ -5,11 +5,15 @@ import {
 } from '../../lib/index.mjs'
 import {
   PoolTypes,
-  WorkerFunctions,
-  WorkerTypes
+  WorkerFunctions
+  // WorkerTypes
 } from '../benchmarks-types.mjs'
 import { buildPool, runTest } from '../benchmarks-utils.mjs'
 
+const WorkerTypes = Object.freeze({
+  thread: 'thread'
+})
+
 const poolSize = availableParallelism()
 const pools = []
 for (const poolType of Object.values(PoolTypes)) {