repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: improve median computation test
[poolifier.git]
/
benchmarks
/
internal
/
bench.js
diff --git
a/benchmarks/internal/bench.js
b/benchmarks/internal/bench.js
index d615f66ea3d83a68c7b787e4ddb52395b1587b27..4663d9c42bf2f27f38b78cb417acbe96bf6f2e86 100644
(file)
--- a/
benchmarks/internal/bench.js
+++ b/
benchmarks/internal/bench.js
@@
-72,6
+72,13
@@
const fixedThreadPoolFairShare = buildPool(
workerChoiceStrategyFairSharePoolOption
)
workerChoiceStrategyFairSharePoolOption
)
+const fixedThreadPoolFairShareTasksQueue = buildPool(
+ WorkerTypes.THREAD,
+ PoolTypes.FIXED,
+ poolSize,
+ { ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
+)
+
const dynamicThreadPoolRoundRobin = buildPool(
WorkerTypes.THREAD,
PoolTypes.DYNAMIC,
const dynamicThreadPoolRoundRobin = buildPool(
WorkerTypes.THREAD,
PoolTypes.DYNAMIC,
@@
-149,6
+156,13
@@
const fixedClusterPoolFairShare = buildPool(
workerChoiceStrategyFairSharePoolOption
)
workerChoiceStrategyFairSharePoolOption
)
+const fixedClusterPoolFairShareTaskQueue = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ { ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
+)
+
const dynamicClusterPoolRoundRobin = buildPool(
WorkerTypes.CLUSTER,
PoolTypes.DYNAMIC,
const dynamicClusterPoolRoundRobin = buildPool(
WorkerTypes.CLUSTER,
PoolTypes.DYNAMIC,
@@
-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,