repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump typescript
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
dynamic-worker-nodes.js
diff --git
a/benchmarks/versus-external-pools/dynamic-worker-nodes.js
b/benchmarks/versus-external-pools/dynamic-worker-nodes.js
index 6a55aaf917cfe2d93f4417415bc3c31171113e6f..7a77d88278877f1acdcc037b8cd55717c76759ee 100644
(file)
--- a/
benchmarks/versus-external-pools/dynamic-worker-nodes.js
+++ b/
benchmarks/versus-external-pools/dynamic-worker-nodes.js
@@
-13,16
+13,16
@@
const data = {
const workerNodes = new WorkerNodes(
require.resolve('./workers/worker-nodes/function-to-bench-worker'),
{
const workerNodes = new WorkerNodes(
require.resolve('./workers/worker-nodes/function-to-bench-worker'),
{
- minWorkers:
size
,
- maxWorkers: size
* 3
,
+ minWorkers:
Math.floor(size / 2)
,
+ maxWorkers: size,
taskTimeout: 60000 // this is the same as poolifier default
}
)
async function run () {
taskTimeout: 60000 // this is the same as poolifier default
}
)
async function run () {
- const promises =
[]
+ const promises =
new Set()
for (let i = 0; i < iterations; i++) {
for (let i = 0; i < iterations; i++) {
- promises.
push
(workerNodes.call.functionToBench(data))
+ promises.
add
(workerNodes.call.functionToBench(data))
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit
}
await Promise.all(promises)
// eslint-disable-next-line n/no-process-exit