repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup enums namespace
[poolifier.git]
/
benchmarks
/
internal
/
bench.js
diff --git
a/benchmarks/internal/bench.js
b/benchmarks/internal/bench.js
index 4663d9c42bf2f27f38b78cb417acbe96bf6f2e86..627bd0ed48d6e12f3c6ecda13ed3aad0a88990ba 100644
(file)
--- a/
benchmarks/internal/bench.js
+++ b/
benchmarks/internal/bench.js
@@
-17,11
+17,11
@@
const tasksQueuePoolOption = { enableTasksQueue: true }
const workerChoiceStrategyRoundRobinPoolOption = {
workerChoiceStrategy: WorkerChoiceStrategies.ROUND_ROBIN
}
const workerChoiceStrategyRoundRobinPoolOption = {
workerChoiceStrategy: WorkerChoiceStrategies.ROUND_ROBIN
}
-const workerChoiceStrategyLe
ss
UsedPoolOption = {
- workerChoiceStrategy: WorkerChoiceStrategies.LE
SS
_USED
+const workerChoiceStrategyLe
ast
UsedPoolOption = {
+ workerChoiceStrategy: WorkerChoiceStrategies.LE
AST
_USED
}
}
-const workerChoiceStrategyLe
ss
BusyPoolOption = {
- workerChoiceStrategy: WorkerChoiceStrategies.LE
SS
_BUSY
+const workerChoiceStrategyLe
ast
BusyPoolOption = {
+ workerChoiceStrategy: WorkerChoiceStrategies.LE
AST
_BUSY
}
const workerChoiceStrategyWeightedRoundRobinPoolOption = {
workerChoiceStrategy: WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN
}
const workerChoiceStrategyWeightedRoundRobinPoolOption = {
workerChoiceStrategy: WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN
@@
-31,169
+31,169
@@
const workerChoiceStrategyFairSharePoolOption = {
}
const fixedThreadPoolRoundRobin = buildPool(
}
const fixedThreadPoolRoundRobin = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
thread
,
+ PoolTypes.
fixed
,
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
const fixedThreadPoolRoundRobinTasksQueue = buildPool(
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
const fixedThreadPoolRoundRobinTasksQueue = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
thread
,
+ PoolTypes.
fixed
,
poolSize,
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
poolSize,
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
-const fixedThreadPoolLe
ss
Used = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
FIXED
,
+const fixedThreadPoolLe
ast
Used = buildPool(
+ WorkerTypes.
thread
,
+ PoolTypes.
fixed
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
UsedPoolOption
+ workerChoiceStrategyLe
ast
UsedPoolOption
)
)
-const fixedThreadPoolLe
ss
Busy = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
FIXED
,
+const fixedThreadPoolLe
ast
Busy = buildPool(
+ WorkerTypes.
thread
,
+ PoolTypes.
fixed
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
BusyPoolOption
+ workerChoiceStrategyLe
ast
BusyPoolOption
)
const fixedThreadPoolWeightedRoundRobin = buildPool(
)
const fixedThreadPoolWeightedRoundRobin = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
thread
,
+ PoolTypes.
fixed
,
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedThreadPoolFairShare = buildPool(
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedThreadPoolFairShare = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
thread
,
+ PoolTypes.
fixed
,
poolSize,
workerChoiceStrategyFairSharePoolOption
)
const fixedThreadPoolFairShareTasksQueue = buildPool(
poolSize,
workerChoiceStrategyFairSharePoolOption
)
const fixedThreadPoolFairShareTasksQueue = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
thread
,
+ PoolTypes.
fixed
,
poolSize,
{ ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
)
const dynamicThreadPoolRoundRobin = buildPool(
poolSize,
{ ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
)
const dynamicThreadPoolRoundRobin = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
DYNAMIC
,
+ WorkerTypes.
thread
,
+ PoolTypes.
dynamic
,
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
-const dynamicThreadPoolLe
ss
Used = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
DYNAMIC
,
+const dynamicThreadPoolLe
ast
Used = buildPool(
+ WorkerTypes.
thread
,
+ PoolTypes.
dynamic
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
UsedPoolOption
+ workerChoiceStrategyLe
ast
UsedPoolOption
)
)
-const dynamicThreadPoolLe
ss
Busy = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
DYNAMIC
,
+const dynamicThreadPoolLe
ast
Busy = buildPool(
+ WorkerTypes.
thread
,
+ PoolTypes.
dynamic
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
BusyPoolOption
+ workerChoiceStrategyLe
ast
BusyPoolOption
)
const dynamicThreadPoolWeightedRoundRobin = buildPool(
)
const dynamicThreadPoolWeightedRoundRobin = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
DYNAMIC
,
+ WorkerTypes.
thread
,
+ PoolTypes.
dynamic
,
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicThreadPoolFairShare = buildPool(
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicThreadPoolFairShare = buildPool(
- WorkerTypes.
THREAD
,
- PoolTypes.
DYNAMIC
,
+ WorkerTypes.
thread
,
+ PoolTypes.
dynamic
,
poolSize,
workerChoiceStrategyFairSharePoolOption
)
const fixedClusterPoolRoundRobin = buildPool(
poolSize,
workerChoiceStrategyFairSharePoolOption
)
const fixedClusterPoolRoundRobin = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
fixed
,
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
const fixedClusterPoolRoundRobinTasksQueue = buildPool(
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
const fixedClusterPoolRoundRobinTasksQueue = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
fixed
,
poolSize,
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
poolSize,
{ ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
)
-const fixedClusterPoolLe
ss
Used = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
FIXED
,
+const fixedClusterPoolLe
ast
Used = buildPool(
+ WorkerTypes.
cluster
,
+ PoolTypes.
fixed
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
UsedPoolOption
+ workerChoiceStrategyLe
ast
UsedPoolOption
)
)
-const fixedClusterPoolLe
ss
Busy = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
FIXED
,
+const fixedClusterPoolLe
ast
Busy = buildPool(
+ WorkerTypes.
cluster
,
+ PoolTypes.
fixed
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
BusyPoolOption
+ workerChoiceStrategyLe
ast
BusyPoolOption
)
const fixedClusterPoolWeightedRoundRobin = buildPool(
)
const fixedClusterPoolWeightedRoundRobin = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
fixed
,
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedClusterPoolFairShare = buildPool(
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const fixedClusterPoolFairShare = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
fixed
,
poolSize,
workerChoiceStrategyFairSharePoolOption
)
const fixedClusterPoolFairShareTaskQueue = buildPool(
poolSize,
workerChoiceStrategyFairSharePoolOption
)
const fixedClusterPoolFairShareTaskQueue = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
FIXED
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
fixed
,
poolSize,
{ ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
)
const dynamicClusterPoolRoundRobin = buildPool(
poolSize,
{ ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
)
const dynamicClusterPoolRoundRobin = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
DYNAMIC
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
dynamic
,
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
poolSize,
workerChoiceStrategyRoundRobinPoolOption
)
-const dynamicClusterPoolLe
ss
Used = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
DYNAMIC
,
+const dynamicClusterPoolLe
ast
Used = buildPool(
+ WorkerTypes.
cluster
,
+ PoolTypes.
dynamic
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
UsedPoolOption
+ workerChoiceStrategyLe
ast
UsedPoolOption
)
)
-const dynamicClusterPoolLe
ss
Busy = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
DYNAMIC
,
+const dynamicClusterPoolLe
ast
Busy = buildPool(
+ WorkerTypes.
cluster
,
+ PoolTypes.
dynamic
,
poolSize,
poolSize,
- workerChoiceStrategyLe
ss
BusyPoolOption
+ workerChoiceStrategyLe
ast
BusyPoolOption
)
const dynamicClusterPoolWeightedRoundRobin = buildPool(
)
const dynamicClusterPoolWeightedRoundRobin = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
DYNAMIC
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
dynamic
,
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicClusterPoolFairShare = buildPool(
poolSize,
workerChoiceStrategyWeightedRoundRobinPoolOption
)
const dynamicClusterPoolFairShare = buildPool(
- WorkerTypes.
CLUSTER
,
- PoolTypes.
DYNAMIC
,
+ WorkerTypes.
cluster
,
+ PoolTypes.
dynamic
,
poolSize,
workerChoiceStrategyFairSharePoolOption
)
poolSize,
workerChoiceStrategyFairSharePoolOption
)
@@
-218,14
+218,14
@@
Benchmark.suite(
})
}
),
})
}
),
- Benchmark.add('Fixed:ThreadPool:Le
ss
Used', async () => {
- await runTest(fixedThreadPoolLe
ss
Used, {
+ Benchmark.add('Fixed:ThreadPool:Le
ast
Used', async () => {
+ await runTest(fixedThreadPoolLe
ast
Used, {
taskExecutions,
workerData
})
}),
taskExecutions,
workerData
})
}),
- Benchmark.add('Fixed:ThreadPool:Le
ss
Busy', async () => {
- await runTest(fixedThreadPoolLe
ss
Busy, {
+ Benchmark.add('Fixed:ThreadPool:Le
ast
Busy', async () => {
+ await runTest(fixedThreadPoolLe
ast
Busy, {
taskExecutions,
workerData
})
taskExecutions,
workerData
})
@@
-257,14
+257,14
@@
Benchmark.suite(
workerData
})
}),
workerData
})
}),
- Benchmark.add('Dynamic:ThreadPool:Le
ss
Used', async () => {
- await runTest(dynamicThreadPoolLe
ss
Used, {
+ Benchmark.add('Dynamic:ThreadPool:Le
ast
Used', async () => {
+ await runTest(dynamicThreadPoolLe
ast
Used, {
taskExecutions,
workerData
})
}),
taskExecutions,
workerData
})
}),
- Benchmark.add('Dynamic:ThreadPool:Le
ss
Busy', async () => {
- await runTest(dynamicThreadPoolLe
ss
Busy, {
+ Benchmark.add('Dynamic:ThreadPool:Le
ast
Busy', async () => {
+ await runTest(dynamicThreadPoolLe
ast
Busy, {
taskExecutions,
workerData
})
taskExecutions,
workerData
})
@@
-296,14
+296,14
@@
Benchmark.suite(
})
}
),
})
}
),
- Benchmark.add('Fixed:ClusterPool:Le
ss
Used', async () => {
- await runTest(fixedClusterPoolLe
ss
Used, {
+ Benchmark.add('Fixed:ClusterPool:Le
ast
Used', async () => {
+ await runTest(fixedClusterPoolLe
ast
Used, {
taskExecutions,
workerData
})
}),
taskExecutions,
workerData
})
}),
- Benchmark.add('Fixed:ClusterPool:Le
ss
Busy', async () => {
- await runTest(fixedClusterPoolLe
ss
Busy, {
+ Benchmark.add('Fixed:ClusterPool:Le
ast
Busy', async () => {
+ await runTest(fixedClusterPoolLe
ast
Busy, {
taskExecutions,
workerData
})
taskExecutions,
workerData
})
@@
-335,14
+335,14
@@
Benchmark.suite(
workerData
})
}),
workerData
})
}),
- Benchmark.add('Dynamic:ClusterPool:Le
ss
Used', async () => {
- await runTest(dynamicClusterPoolLe
ss
Used, {
+ Benchmark.add('Dynamic:ClusterPool:Le
ast
Used', async () => {
+ await runTest(dynamicClusterPoolLe
ast
Used, {
taskExecutions,
workerData
})
}),
taskExecutions,
workerData
})
}),
- Benchmark.add('Dynamic:ClusterPool:Le
ss
Busy', async () => {
- await runTest(dynamicClusterPoolLe
ss
Busy, {
+ Benchmark.add('Dynamic:ClusterPool:Le
ast
Busy', async () => {
+ await runTest(dynamicClusterPoolLe
ast
Busy, {
taskExecutions,
workerData
})
taskExecutions,
workerData
})