repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into feature/task-functions
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
dynamic-node-worker-threads-pool.mjs
diff --git
a/benchmarks/versus-external-pools/dynamic-node-worker-threads-pool.mjs
b/benchmarks/versus-external-pools/dynamic-node-worker-threads-pool.mjs
index ed8285026c740b93cec25465f6c2835e9a53931f..c4be1ee1c6d1a0ca312d1597c1d8e4a48406d5fd 100644
(file)
--- a/
benchmarks/versus-external-pools/dynamic-node-worker-threads-pool.mjs
+++ b/
benchmarks/versus-external-pools/dynamic-node-worker-threads-pool.mjs
@@
-1,5
+1,5
@@
import { DynamicPool } from 'node-worker-threads-pool'
import { DynamicPool } from 'node-worker-threads-pool'
-import { executeAsyncFn } from '.
./benchmarks-
utils.mjs'
+import { executeAsyncFn } from '.
/
utils.mjs'
import functionToBench from './functions/function-to-bench.js'
const size = parseInt(process.env.POOL_SIZE)
import functionToBench from './functions/function-to-bench.js'
const size = parseInt(process.env.POOL_SIZE)
@@
-10,13
+10,13
@@
const data = {
taskSize: parseInt(process.env.TASK_SIZE)
}
taskSize: parseInt(process.env.TASK_SIZE)
}
-const
p
ool = new DynamicPool(size)
+const
dynamicP
ool = new DynamicPool(size)
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
promises.add(
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
promises.add(
-
p
ool.exec({
+
dynamicP
ool.exec({
task: functionToBench,
param: data,
timeout: 60000 // this is the same as poolifier default
task: functionToBench,
param: data,
timeout: 60000 // this is the same as poolifier default