Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
})
}
+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'
import {
LIST_FORMATTER,
buildPoolifierPool,
+ getPoolImplementationName,
runPoolifierTest
} from '../benchmarks-utils.mjs'
for (const workerChoiceStrategy of Object.values(WorkerChoiceStrategies)) {
for (const enableTasksQueue of [false, true]) {
poolifierSuite.add(
- `${pool.constructor.name}|${workerChoiceStrategy}|${
+ `${getPoolImplementationName(pool)}|${workerChoiceStrategy}|${
enableTasksQueue ? 'with' : 'without'
} tasks queue`,
async () => {