refactor: cleanup internal benchmark code
[poolifier.git] / benchmarks / internal / cluster / dynamic.js
diff --git a/benchmarks/internal/cluster/dynamic.js b/benchmarks/internal/cluster/dynamic.js
deleted file mode 100644 (file)
index 475ba9d..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-const {
-  DynamicClusterPool,
-  WorkerChoiceStrategies
-} = require('../../../lib/index')
-const { runPoolifierTest } = require('../../benchmarks-utils')
-
-const size = 30
-const numberOfTasks = 1
-
-const dynamicPool = new DynamicClusterPool(
-  size / 2,
-  size * 3,
-  './benchmarks/internal/cluster/worker.js'
-)
-
-const dynamicPoolLessUsed = new DynamicClusterPool(
-  size / 2,
-  size * 3,
-  './benchmarks/internal/cluster/worker.js',
-  { workerChoiceStrategy: WorkerChoiceStrategies.LESS_USED }
-)
-
-const dynamicPoolLessBusy = new DynamicClusterPool(
-  size / 2,
-  size * 3,
-  './benchmarks/internal/cluster/worker.js',
-  { workerChoiceStrategy: WorkerChoiceStrategies.LESS_BUSY }
-)
-
-const dynamicPoolWeightedRoundRobin = new DynamicClusterPool(
-  size / 2,
-  size * 3,
-  './benchmarks/internal/cluster/worker.js',
-  { workerChoiceStrategy: WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN }
-)
-
-const dynamicPoolFairShare = new DynamicClusterPool(
-  size / 2,
-  size * 3,
-  './benchmarks/internal/cluster/worker.js',
-  { workerChoiceStrategy: WorkerChoiceStrategies.FAIR_SHARE }
-)
-
-async function dynamicClusterTest (
-  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
-) {
-  return runPoolifierTest(dynamicPool, { tasks, workerData })
-}
-
-async function dynamicClusterTestLessUsed (
-  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
-) {
-  return runPoolifierTest(dynamicPoolLessUsed, { tasks, workerData })
-}
-
-async function dynamicClusterTestLessBusy (
-  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
-) {
-  return runPoolifierTest(dynamicPoolLessBusy, { tasks, workerData })
-}
-
-async function dynamicClusterTestWeightedRoundRobin (
-  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
-) {
-  return runPoolifierTest(dynamicPoolWeightedRoundRobin, { tasks, workerData })
-}
-
-async function dynamicClusterTestFairShare (
-  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
-) {
-  return runPoolifierTest(dynamicPoolFairShare, { tasks, workerData })
-}
-
-module.exports = {
-  dynamicClusterTest,
-  dynamicClusterTestLessUsed,
-  dynamicClusterTestLessBusy,
-  dynamicClusterTestWeightedRoundRobin,
-  dynamicClusterTestFairShare
-}