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): apply updates
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
fixed-worker-nodes.js
diff --git
a/benchmarks/versus-external-pools/fixed-worker-nodes.js
b/benchmarks/versus-external-pools/fixed-worker-nodes.js
index 641afd77ecf430efbedd2fd089452496c75f008e..d5b01353d2eb0a9c54272e9619080bec92d7bebb 100644
(file)
--- a/
benchmarks/versus-external-pools/fixed-worker-nodes.js
+++ b/
benchmarks/versus-external-pools/fixed-worker-nodes.js
@@
-1,3
+1,4
@@
+'use strict'
// IMPORT LIBRARIES
const WorkerNodes = require('worker-nodes')
// FINISH IMPORT LIBRARIES
// IMPORT LIBRARIES
const WorkerNodes = require('worker-nodes')
// FINISH IMPORT LIBRARIES
@@
-19,9
+20,9
@@
const workerNodes = new WorkerNodes(
)
async function run () {
)
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