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 da691aa9237a387d1b6d2cfe4ffe01d64cf506f9..7e31a838eceaaa271abcc7cf9a277a70eb6bbc75 100644
(file)
--- a/
benchmarks/internal/cluster/fixed.js
+++ b/
benchmarks/internal/cluster/fixed.js
@@
-12,10
+12,16
@@
const fixedPool = new FixedClusterPool(
'./benchmarks/internal/cluster/worker.js'
)
'./benchmarks/internal/cluster/worker.js'
)
-const fixedPoolLess
Recently
Used = new FixedClusterPool(
+const fixedPoolLessUsed = new FixedClusterPool(
size,
'./benchmarks/internal/cluster/worker.js',
size,
'./benchmarks/internal/cluster/worker.js',
- { workerChoiceStrategy: WorkerChoiceStrategies.LESS_RECENTLY_USED }
+ { workerChoiceStrategy: WorkerChoiceStrategies.LESS_USED }
+)
+
+const fixedPoolLessBusy = new FixedClusterPool(
+ size,
+ './benchmarks/internal/cluster/worker.js',
+ { workerChoiceStrategy: WorkerChoiceStrategies.LESS_BUSY }
)
const fixedPoolWeightedRoundRobin = new FixedClusterPool(
)
const fixedPoolWeightedRoundRobin = new FixedClusterPool(
@@
-36,10
+42,16
@@
async function fixedClusterTest (
return runPoolifierTest(fixedPool, { tasks, workerData })
}
return runPoolifierTest(fixedPool, { tasks, workerData })
}
-async function fixedClusterTestLessRecentlyUsed (
+async function fixedClusterTestLessUsed (
+ { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
+) {
+ return runPoolifierTest(fixedPoolLessUsed, { tasks, workerData })
+}
+
+async function fixedClusterTestLessBusy (
{ tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
) {
{ tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
) {
- return runPoolifierTest(fixedPoolLess
RecentlyUsed
, { tasks, workerData })
+ return runPoolifierTest(fixedPoolLess
Busy
, { tasks, workerData })
}
async function fixedClusterTestWeightedRoundRobin (
}
async function fixedClusterTestWeightedRoundRobin (
@@
-56,7
+68,8
@@
async function fixedClusterTestFairShare (
module.exports = {
fixedClusterTest,
module.exports = {
fixedClusterTest,
- fixedClusterTestLessRecentlyUsed,
+ fixedClusterTestLessUsed,
+ fixedClusterTestLessBusy,
fixedClusterTestWeightedRoundRobin,
fixedClusterTestFairShare
}
fixedClusterTestWeightedRoundRobin,
fixedClusterTestFairShare
}