const crypto = require('crypto')
const fs = require('fs')
-const {
- PoolTypes,
- WorkerFunctions,
- WorkerTypes
-} = require('./benchmarks-types')
const {
DynamicClusterPool,
DynamicThreadPool,
FixedClusterPool,
FixedThreadPool
} = require('../lib')
+const {
+ PoolTypes,
+ WorkerFunctions,
+ WorkerTypes
+} = require('./benchmarks-types')
async function runTest (pool, { taskExecutions, workerData }) {
return new Promise((resolve, reject) => {
/**
* Intentionally inefficient implementation.
- *
* @param {number} n - The number of fibonacci numbers to generate.
* @returns {number} - The nth fibonacci number.
*/
/**
* Intentionally inefficient implementation.
- *
* @param {number} n - The number to calculate the factorial of.
* @returns {number} - The factorial of n.
*/
}
}
-function buildPool (poolType, poolSize, workerType, poolOptions) {
+function buildPool (workerType, poolType, poolSize, poolOptions) {
switch (poolType) {
case PoolTypes.FIXED:
switch (workerType) {