summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
479ba9f)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
taskSize: parseInt(process.env.TASK_SIZE)
}
taskSize: parseInt(process.env.TASK_SIZE)
}
-const pool = new DynamicPool(size)
+const dynamicPool = 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(
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
taskSize: parseInt(process.env.TASK_SIZE)
}
taskSize: parseInt(process.env.TASK_SIZE)
}
-const dynamicPool = new DynamicThreadPool(
+const dynamicThreadPool = new DynamicThreadPool(
Math.floor(size / 2),
size,
'./workers/poolifier/function-to-bench-worker.mjs',
Math.floor(size / 2),
size,
'./workers/poolifier/function-to-bench-worker.mjs',
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
- promises.add(dynamicPool.execute(data))
+ promises.add(dynamicThreadPool.execute(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
taskSize: parseInt(process.env.TASK_SIZE)
}
taskSize: parseInt(process.env.TASK_SIZE)
}
-const fixedPool = new FixedThreadPool(
+const fixedThreadPool = new FixedThreadPool(
size,
'./workers/poolifier/function-to-bench-worker.mjs',
{
size,
'./workers/poolifier/function-to-bench-worker.mjs',
{
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
- promises.add(fixedPool.execute(data))
+ promises.add(fixedThreadPool.execute(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
taskSize: parseInt(process.env.TASK_SIZE)
}
taskSize: parseInt(process.env.TASK_SIZE)
}
-const pool = new StaticPool({
+const staticPool = new StaticPool({
size,
task: functionToBench
})
size,
task: functionToBench
})
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
async function run () {
const promises = new Set()
for (let i = 0; i < iterations; i++) {
- promises.add(pool.exec(data))
+ promises.add(staticPool.exec(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