repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup median computation code
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
fixed-poolifier.js
diff --git
a/benchmarks/versus-external-pools/fixed-poolifier.js
b/benchmarks/versus-external-pools/fixed-poolifier.js
index c994620899f15283d478b3d9494186607b109a66..2a5e599ab11aefc0948bb8ec208f3650ede4e02f 100644
(file)
--- a/
benchmarks/versus-external-pools/fixed-poolifier.js
+++ b/
benchmarks/versus-external-pools/fixed-poolifier.js
@@
-1,19
+1,17
@@
// IMPORT LIBRARIES
// IMPORT LIBRARIES
-const { FixedThreadPool
, DynamicThreadPool
} = require('poolifier')
+const { FixedThreadPool } = require('poolifier')
// FINISH IMPORT LIBRARIES
// FINISH IMPORT LIBRARIES
-const size = p
rocess.env.POOL_SIZE
-const iterations = p
rocess.env.NUM_ITERATIONS
+const size = p
arseInt(process.env.POOL_SIZE)
+const iterations = p
arseInt(process.env.NUM_ITERATIONS)
const data = {
test: 'MYBENCH',
const data = {
test: 'MYBENCH',
- taskType: process.env['TASK_TYPE']
+ taskType: process.env.TASK_TYPE,
+ taskSize: parseInt(process.env.TASK_SIZE)
}
const fixedPool = new FixedThreadPool(
size,
}
const fixedPool = new FixedThreadPool(
size,
- './workers/poolifier/function-to-bench-worker.js',
- {
- maxTasks: 100000
- }
+ './workers/poolifier/function-to-bench-worker.js'
)
async function run () {
)
async function run () {
@@
-22,6
+20,7
@@
async function run () {
promises.push(fixedPool.execute(data))
}
await Promise.all(promises)
promises.push(fixedPool.execute(data))
}
await Promise.all(promises)
+ // eslint-disable-next-line n/no-process-exit
process.exit()
}
process.exit()
}