Merge branch 'feature/task-functions' of github.com:poolifier/poolifier into feature...
[poolifier.git] / benchmarks / benchmarks-utils.mjs
index 98893f62ddde73b6b0b10feb86b84e79ad8e4683..762966cf2437974977ec2e70012488a4e541c8ee 100644 (file)
@@ -78,6 +78,18 @@ export const runPoolifierTest = async (
   })
 }
 
+export const getPoolImplementationName = pool => {
+  if (pool instanceof FixedThreadPool) {
+    return 'FixedThreadPool'
+  } else if (pool instanceof DynamicThreadPool) {
+    return 'DynamicThreadPool'
+  } else if (pool instanceof FixedClusterPool) {
+    return 'FixedClusterPool'
+  } else if (pool instanceof DynamicClusterPool) {
+    return 'DynamicClusterPool'
+  }
+}
+
 export const LIST_FORMATTER = new Intl.ListFormat('en-US', {
   style: 'long',
   type: 'conjunction'