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' of github.com:jerome-benoit/poolifier
[poolifier.git]
/
benchmarks
/
internal
/
cluster
/
fixed.js
diff --git
a/benchmarks/internal/cluster/fixed.js
b/benchmarks/internal/cluster/fixed.js
index 69e4a14870013bd5f3136d8ecb25309c9d93c163..7e31a838eceaaa271abcc7cf9a277a70eb6bbc75 100644
(file)
--- a/
benchmarks/internal/cluster/fixed.js
+++ b/
benchmarks/internal/cluster/fixed.js
@@
-18,6
+18,12
@@
const fixedPoolLessUsed = new FixedClusterPool(
{ workerChoiceStrategy: WorkerChoiceStrategies.LESS_USED }
)
{ workerChoiceStrategy: WorkerChoiceStrategies.LESS_USED }
)
+const fixedPoolLessBusy = new FixedClusterPool(
+ size,
+ './benchmarks/internal/cluster/worker.js',
+ { workerChoiceStrategy: WorkerChoiceStrategies.LESS_BUSY }
+)
+
const fixedPoolWeightedRoundRobin = new FixedClusterPool(
size,
'./benchmarks/internal/cluster/worker.js',
const fixedPoolWeightedRoundRobin = new FixedClusterPool(
size,
'./benchmarks/internal/cluster/worker.js',
@@
-42,6
+48,12
@@
async function fixedClusterTestLessUsed (
return runPoolifierTest(fixedPoolLessUsed, { tasks, workerData })
}
return runPoolifierTest(fixedPoolLessUsed, { tasks, workerData })
}
+async function fixedClusterTestLessBusy (
+ { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
+) {
+ return runPoolifierTest(fixedPoolLessBusy, { tasks, workerData })
+}
+
async function fixedClusterTestWeightedRoundRobin (
{ tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
) {
async function fixedClusterTestWeightedRoundRobin (
{ tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
) {
@@
-57,6
+69,7
@@
async function fixedClusterTestFairShare (
module.exports = {
fixedClusterTest,
fixedClusterTestLessUsed,
module.exports = {
fixedClusterTest,
fixedClusterTestLessUsed,
+ fixedClusterTestLessBusy,
fixedClusterTestWeightedRoundRobin,
fixedClusterTestFairShare
}
fixedClusterTestWeightedRoundRobin,
fixedClusterTestFairShare
}