repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: update benchmarks vs. external pool
[poolifier.git]
/
benchmarks
/
internal
/
bench.js
diff --git
a/benchmarks/internal/bench.js
b/benchmarks/internal/bench.js
index 4c126a00fb9d531011b71cb52e459c2aa017b695..4663d9c42bf2f27f38b78cb417acbe96bf6f2e86 100644
(file)
--- a/
benchmarks/internal/bench.js
+++ b/
benchmarks/internal/bench.js
@@
-31,156
+31,170
@@
const workerChoiceStrategyFairSharePoolOption = {
}
const fixedThreadPoolRoundRobin = buildPool(
}
const fixedThreadPoolRoundRobin = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyRoundRobinPoolOption
)
const fixedThreadPoolRoundRobinTasksQueue = buildPool(
workerChoiceStrategyRoundRobinPoolOption
)
const fixedThreadPoolRoundRobinTasksQueue = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.THREAD,
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
const fixedThreadPoolLessUsed = buildPool(
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
const fixedThreadPoolLessUsed = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyLessUsedPoolOption
)
const fixedThreadPoolLessBusy = buildPool(
workerChoiceStrategyLessUsedPoolOption
)
const fixedThreadPoolLessBusy = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyLessBusyPoolOption
)
const fixedThreadPoolWeightedRoundRobin = buildPool(
workerChoiceStrategyLessBusyPoolOption
)
const fixedThreadPoolWeightedRoundRobin = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedThreadPoolFairShare = buildPool(
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedThreadPoolFairShare = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyFairSharePoolOption
)
workerChoiceStrategyFairSharePoolOption
)
+const fixedThreadPoolFairShareTasksQueue = buildPool(
+ WorkerTypes.THREAD,
+ PoolTypes.FIXED,
+ poolSize,
+ { ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
+)
+
const dynamicThreadPoolRoundRobin = buildPool(
const dynamicThreadPoolRoundRobin = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyRoundRobinPoolOption
)
const dynamicThreadPoolLessUsed = buildPool(
workerChoiceStrategyRoundRobinPoolOption
)
const dynamicThreadPoolLessUsed = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyLessUsedPoolOption
)
const dynamicThreadPoolLessBusy = buildPool(
workerChoiceStrategyLessUsedPoolOption
)
const dynamicThreadPoolLessBusy = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyLessBusyPoolOption
)
const dynamicThreadPoolWeightedRoundRobin = buildPool(
workerChoiceStrategyLessBusyPoolOption
)
const dynamicThreadPoolWeightedRoundRobin = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicThreadPoolFairShare = buildPool(
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicThreadPoolFairShare = buildPool(
+ WorkerTypes.THREAD,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.THREAD,
workerChoiceStrategyFairSharePoolOption
)
const fixedClusterPoolRoundRobin = buildPool(
workerChoiceStrategyFairSharePoolOption
)
const fixedClusterPoolRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyRoundRobinPoolOption
)
const fixedClusterPoolRoundRobinTasksQueue = buildPool(
workerChoiceStrategyRoundRobinPoolOption
)
const fixedClusterPoolRoundRobinTasksQueue = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.CLUSTER,
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
const fixedClusterPoolLessUsed = buildPool(
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
const fixedClusterPoolLessUsed = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyLessUsedPoolOption
)
const fixedClusterPoolLessBusy = buildPool(
workerChoiceStrategyLessUsedPoolOption
)
const fixedClusterPoolLessBusy = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyLessBusyPoolOption
)
const fixedClusterPoolWeightedRoundRobin = buildPool(
workerChoiceStrategyLessBusyPoolOption
)
const fixedClusterPoolWeightedRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedClusterPoolFairShare = buildPool(
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedClusterPoolFairShare = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.FIXED,
poolSize,
PoolTypes.FIXED,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyFairSharePoolOption
)
workerChoiceStrategyFairSharePoolOption
)
+const fixedClusterPoolFairShareTaskQueue = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ { ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
+)
+
const dynamicClusterPoolRoundRobin = buildPool(
const dynamicClusterPoolRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyRoundRobinPoolOption
)
const dynamicClusterPoolLessUsed = buildPool(
workerChoiceStrategyRoundRobinPoolOption
)
const dynamicClusterPoolLessUsed = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyLessUsedPoolOption
)
const dynamicClusterPoolLessBusy = buildPool(
workerChoiceStrategyLessUsedPoolOption
)
const dynamicClusterPoolLessBusy = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyLessBusyPoolOption
)
const dynamicClusterPoolWeightedRoundRobin = buildPool(
workerChoiceStrategyLessBusyPoolOption
)
const dynamicClusterPoolWeightedRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicClusterPoolFairShare = buildPool(
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicClusterPoolFairShare = buildPool(
+ WorkerTypes.CLUSTER,
PoolTypes.DYNAMIC,
poolSize,
PoolTypes.DYNAMIC,
poolSize,
- WorkerTypes.CLUSTER,
workerChoiceStrategyFairSharePoolOption
)
workerChoiceStrategyFairSharePoolOption
)
@@
-228,6
+242,15
@@
Benchmark.suite(
workerData
})
}),
workerData
})
}),
+ Benchmark.add(
+ 'Fixed:ThreadPool:FairShare:{ enableTasksQueue: true }',
+ async () => {
+ await runTest(fixedThreadPoolFairShareTasksQueue, {
+ taskExecutions,
+ workerData
+ })
+ }
+ ),
Benchmark.add('Dynamic:ThreadPool:RoundRobin', async () => {
await runTest(dynamicThreadPoolRoundRobin, {
taskExecutions,
Benchmark.add('Dynamic:ThreadPool:RoundRobin', async () => {
await runTest(dynamicThreadPoolRoundRobin, {
taskExecutions,
@@
-297,6
+320,15
@@
Benchmark.suite(
workerData
})
}),
workerData
})
}),
+ Benchmark.add(
+ 'Fixed:ClusterPool:FairShare:{ enableTasksQueue: true }',
+ async () => {
+ await runTest(fixedClusterPoolFairShareTaskQueue, {
+ taskExecutions,
+ workerData
+ })
+ }
+ ),
Benchmark.add('Dynamic:ClusterPool:RoundRobin', async () => {
await runTest(dynamicClusterPoolRoundRobin, {
taskExecutions,
Benchmark.add('Dynamic:ClusterPool:RoundRobin', async () => {
await runTest(dynamicClusterPoolRoundRobin, {
taskExecutions,