repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge dependabot/npm_and_yarn/examples/typescript/http-server-pool/fastify-cluster...
[poolifier.git]
/
benchmarks
/
internal
/
bench.mjs
diff --git
a/benchmarks/internal/bench.mjs
b/benchmarks/internal/bench.mjs
index 7ef61bc6cba31225a4d8732b721422494deeb4d3..b59514d225b45adf149f011798156af1a7bcf675 100644
(file)
--- a/
benchmarks/internal/bench.mjs
+++ b/
benchmarks/internal/bench.mjs
@@
-1,13
+1,12
@@
+import { exit } from 'node:process'
+
import {
import {
+ availableParallelism,
PoolTypes,
PoolTypes,
- WorkerTypes,
- availableParallelism
+ WorkerTypes
} from '../../lib/index.mjs'
} from '../../lib/index.mjs'
-import { TaskFunctions } from '../benchmarks-types.js'
-import {
- buildPoolifierPool,
- runPoolifierPoolBenchmark
-} from '../benchmarks-utils.js'
+import { TaskFunctions } from '../benchmarks-types.cjs'
+import { runPoolifierPoolBenchmark } from '../benchmarks-utils.cjs'
const poolSize = availableParallelism()
const taskExecutions = 1
const poolSize = availableParallelism()
const taskExecutions = 1
@@
-18,8
+17,10
@@
const workerData = {
// FixedThreadPool
await runPoolifierPoolBenchmark(
// FixedThreadPool
await runPoolifierPoolBenchmark(
- 'Poolifier FixedThreadPool',
- buildPoolifierPool(WorkerTypes.thread, PoolTypes.fixed, poolSize),
+ 'FixedThreadPool',
+ WorkerTypes.thread,
+ PoolTypes.fixed,
+ poolSize,
{
taskExecutions,
workerData
{
taskExecutions,
workerData
@@
-28,8
+29,10
@@
await runPoolifierPoolBenchmark(
// DynamicThreadPool
await runPoolifierPoolBenchmark(
// DynamicThreadPool
await runPoolifierPoolBenchmark(
- 'Poolifier DynamicThreadPool',
- buildPoolifierPool(WorkerTypes.thread, PoolTypes.dynamic, poolSize),
+ 'DynamicThreadPool',
+ WorkerTypes.thread,
+ PoolTypes.dynamic,
+ poolSize,
{
taskExecutions,
workerData
{
taskExecutions,
workerData
@@
-38,8
+41,10
@@
await runPoolifierPoolBenchmark(
// FixedClusterPool
await runPoolifierPoolBenchmark(
// FixedClusterPool
await runPoolifierPoolBenchmark(
- 'Poolifier FixedClusterPool',
- buildPoolifierPool(WorkerTypes.cluster, PoolTypes.fixed, poolSize),
+ 'FixedClusterPool',
+ WorkerTypes.cluster,
+ PoolTypes.fixed,
+ poolSize,
{
taskExecutions,
workerData
{
taskExecutions,
workerData
@@
-48,10
+53,14
@@
await runPoolifierPoolBenchmark(
// DynamicClusterPool
await runPoolifierPoolBenchmark(
// DynamicClusterPool
await runPoolifierPoolBenchmark(
- 'Poolifier DynamicClusterPool',
- buildPoolifierPool(WorkerTypes.cluster, PoolTypes.dynamic, poolSize),
+ 'DynamicClusterPool',
+ WorkerTypes.cluster,
+ PoolTypes.dynamic,
+ poolSize,
{
taskExecutions,
workerData
}
)
{
taskExecutions,
workerData
}
)
+
+exit()