repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): bump fastify
[poolifier.git]
/
benchmarks
/
internal
/
bench.mjs
diff --git
a/benchmarks/internal/bench.mjs
b/benchmarks/internal/bench.mjs
index 8235d5727b9e0043c0948fd4dfbbb8249a57e05c..a14ecd5f12086acf98e64cc2c877c68b0bbbf91f 100644
(file)
--- a/
benchmarks/internal/bench.mjs
+++ b/
benchmarks/internal/bench.mjs
@@
-6,8
+6,8
@@
import {
WorkerTypes,
availableParallelism
} from '../../lib/index.mjs'
WorkerTypes,
availableParallelism
} from '../../lib/index.mjs'
-import {
Worker
Functions } from '../benchmarks-types.mjs'
-import { buildPool
, run
Test } from '../benchmarks-utils.mjs'
+import {
Task
Functions } from '../benchmarks-types.mjs'
+import { buildPool
ifierPool, runPoolifier
Test } from '../benchmarks-utils.mjs'
const poolSize = availableParallelism()
const pools = []
const poolSize = availableParallelism()
const pools = []
@@
-22,7
+22,7
@@
for (const poolType of Object.values(PoolTypes)) {
for (const measurement of [Measurements.runTime, Measurements.elu]) {
pools.push([
`${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}|measurement:${measurement}`,
for (const measurement of [Measurements.runTime, Measurements.elu]) {
pools.push([
`${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}|measurement:${measurement}`,
- buildPool(workerType, poolType, poolSize, {
+ buildPool
ifierPool
(workerType, poolType, poolSize, {
workerChoiceStrategy,
workerChoiceStrategyOptions: {
measurement
workerChoiceStrategy,
workerChoiceStrategyOptions: {
measurement
@@
-34,7
+34,7
@@
for (const poolType of Object.values(PoolTypes)) {
} else {
pools.push([
`${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}`,
} else {
pools.push([
`${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}`,
- buildPool(workerType, poolType, poolSize, {
+ buildPool
ifierPool
(workerType, poolType, poolSize, {
workerChoiceStrategy,
enableTasksQueue
})
workerChoiceStrategy,
enableTasksQueue
})
@@
-47,13
+47,13
@@
for (const poolType of Object.values(PoolTypes)) {
const taskExecutions = 1
const workerData = {
const taskExecutions = 1
const workerData = {
- function:
Worker
Functions.jsonIntegerSerialization,
+ function:
Task
Functions.jsonIntegerSerialization,
taskSize: 1000
}
const addPools = pools =>
pools.map(([name, pool]) => {
return add(name, async () => {
taskSize: 1000
}
const addPools = pools =>
pools.map(([name, pool]) => {
return add(name, async () => {
- await runTest(pool, {
+ await run
Poolifier
Test(pool, {
taskExecutions,
workerData
})
taskExecutions,
workerData
})