Commit | Line | Data |
---|---|---|
1 | const { FixedClusterPool } = require('../../../lib/index') | |
2 | const { runTest } = require('../benchmark-utils') | |
3 | ||
4 | const size = 30 | |
5 | ||
6 | const fixedPool = new FixedClusterPool( | |
7 | size, | |
8 | './benchmarks/internal/cluster/worker.js' | |
9 | ) | |
10 | ||
11 | async function fixedClusterTest ( | |
12 | { tasks, workerData } = { tasks: 1, workerData: { proof: 'ok' } } | |
13 | ) { | |
14 | return runTest(fixedPool, { tasks, workerData }) | |
15 | } | |
16 | ||
17 | module.exports = { fixedClusterTest } |