Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
WorkerChoiceStrategies,
WorkerTypes
} from '../lib/index.mjs'
+import { executeTaskFunction } from './benchmarks-utils.cjs'
const buildPoolifierPool = (workerType, poolType, poolSize, poolOptions) => {
switch (poolType) {
style: 'long',
type: 'conjunction'
})
+
+export { executeTaskFunction }
taskSize: 50000
}
-const options = {
- type: {
- type: 'string',
- short: 't'
- }
-}
-const { values } = parseArgs({
- args: process.argv,
- options,
- strict: true,
- allowPositionals: true
-})
-
let fixedThreadPool
let dynamicThreadPool
let fixedClusterPool
let dynamicClusterPool
-switch (values.type) {
+switch (
+ parseArgs({
+ args: process.argv,
+ options: {
+ type: {
+ type: 'string',
+ short: 't'
+ }
+ },
+ strict: true,
+ allowPositionals: true
+ }).values.type
+) {
case 'mitata':
fixedThreadPool = buildPoolifierBenchmarkMitata(
'FixedThreadPool',