fix(benchmark): add missing export
[poolifier.git] / benchmarks / internal / bench.mjs
index 442326a76f908fd0f9c301a67c09d9c6d40ef861..aa98be858bb66f6f819f4c52c190cab45c48d6fc 100644 (file)
@@ -21,24 +21,23 @@ const workerData = {
   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',