4 } = require('../../../lib/index')
5 const { runPoolifierTest
} = require('../benchmark-utils')
9 const fixedPool
= new FixedClusterPool(
11 './benchmarks/internal/cluster/worker.js'
14 const fixedPoolLessRecentlyUsed
= new FixedClusterPool(
16 './benchmarks/internal/cluster/worker.js',
17 { workerChoiceStrategy
: WorkerChoiceStrategies
.LESS_RECENTLY_USED
}
20 async
function fixedClusterTest (
21 { tasks
, workerData
} = { tasks
: 1, workerData
: { proof
: 'ok' } }
23 return runPoolifierTest(fixedPool
, { tasks
, workerData
})
26 async
function fixedClusterTestLessRecentlyUsed (
27 { tasks
, workerData
} = { tasks
: 1, workerData
: { proof
: 'ok' } }
29 return runPoolifierTest(fixedPoolLessRecentlyUsed
, { tasks
, workerData
})
32 module
.exports
= { fixedClusterTest
, fixedClusterTestLessRecentlyUsed
}