docs: enhance some methods documentation
[poolifier.git] / benchmarks / internal / bench.js
index e88f40cf9334f5daf0ed32fb1c525c9939d7ede5..218648281fca341b0566fe977f30d0acbe893321 100644 (file)
@@ -2,26 +2,30 @@ const Benchmark = require('benny')
 const {
   dynamicClusterTest,
   dynamicClusterTestFairShare,
-  dynamicClusterTestLessRecentlyUsed,
-  dynamicClusterTestWeightedRoundRobin
+  dynamicClusterTestLessUsed,
+  dynamicClusterTestWeightedRoundRobin,
+  dynamicClusterTestLessBusy
 } = require('./cluster/dynamic')
 const {
   fixedClusterTest,
   fixedClusterTestFairShare,
-  fixedClusterTestLessRecentlyUsed,
-  fixedClusterTestWeightedRoundRobin
+  fixedClusterTestLessUsed,
+  fixedClusterTestWeightedRoundRobin,
+  fixedClusterTestLessBusy
 } = require('./cluster/fixed')
 const {
   dynamicThreadTest,
   dynamicThreadTestFairShare,
-  dynamicThreadTestLessRecentlyUsed,
-  dynamicThreadTestWeightedRoundRobin
+  dynamicThreadTestLessUsed,
+  dynamicThreadTestWeightedRoundRobin,
+  dynamicThreadTestLessBusy
 } = require('./thread/dynamic')
 const {
   fixedThreadTest,
   fixedThreadTestFairShare,
-  fixedThreadTestLessRecentlyUsed,
-  fixedThreadTestWeightedRoundRobin
+  fixedThreadTestLessUsed,
+  fixedThreadTestWeightedRoundRobin,
+  fixedThreadTestLessBusy
 } = require('./thread/fixed')
 
 const resultsFile = 'poolifier'
@@ -32,8 +36,11 @@ Benchmark.suite(
   Benchmark.add('Poolifier:Fixed:ThreadPool', async () => {
     await fixedThreadTest()
   }),
-  Benchmark.add('Poolifier:Fixed:ThreadPool:LessRecentlyUsed', async () => {
-    await fixedThreadTestLessRecentlyUsed()
+  Benchmark.add('Poolifier:Fixed:ThreadPool:LessUsed', async () => {
+    await fixedThreadTestLessUsed()
+  }),
+  Benchmark.add('Poolifier:Fixed:ThreadPool:LessBusy', async () => {
+    await fixedThreadTestLessBusy()
   }),
   Benchmark.add('Poolifier:Fixed:ThreadPool:WeightedRoundRobin', async () => {
     await fixedThreadTestWeightedRoundRobin()
@@ -44,8 +51,11 @@ Benchmark.suite(
   Benchmark.add('Poolifier:Dynamic:ThreadPool', async () => {
     await dynamicThreadTest()
   }),
-  Benchmark.add('Poolifier:Dynamic:ThreadPool:LessRecentlyUsed', async () => {
-    await dynamicThreadTestLessRecentlyUsed()
+  Benchmark.add('Poolifier:Dynamic:ThreadPool:LessUsed', async () => {
+    await dynamicThreadTestLessUsed()
+  }),
+  Benchmark.add('Poolifier:Dynamic:ThreadPool:LessBusy', async () => {
+    await dynamicThreadTestLessBusy()
   }),
   Benchmark.add('Poolifier:Dynamic:ThreadPool:WeightedRoundRobin', async () => {
     await dynamicThreadTestWeightedRoundRobin()
@@ -56,11 +66,14 @@ Benchmark.suite(
   Benchmark.add('Poolifier:Fixed:ClusterPool', async () => {
     await fixedClusterTest()
   }),
-  Benchmark.add('Poolifier:Fixed:ClusterPool:LessRecentlyUsed', async () => {
-    await fixedClusterTestLessRecentlyUsed()
+  Benchmark.add('Poolifier:Fixed:ClusterPool:LessUsed', async () => {
+    await fixedClusterTestLessUsed()
+  }),
+  Benchmark.add('Poolifier:Fixed:ClusterPool:LessBusy', async () => {
+    await fixedClusterTestLessBusy()
   }),
   Benchmark.add('Poolifier:Fixed:ClusterPool:WeightedRoundRobin', async () => {
-    await fixedClusterTestWeightedRoundRobin
+    await fixedClusterTestWeightedRoundRobin()
   }),
   Benchmark.add('Poolifier:Fixed:ClusterPool:FairShare', async () => {
     await fixedClusterTestFairShare()
@@ -68,13 +81,16 @@ Benchmark.suite(
   Benchmark.add('Poolifier:Dynamic:ClusterPool', async () => {
     await dynamicClusterTest()
   }),
-  Benchmark.add('Poolifier:Dynamic:ClusterPool:LessRecentlyUsed', async () => {
-    await dynamicClusterTestLessRecentlyUsed()
+  Benchmark.add('Poolifier:Dynamic:ClusterPool:LessUsed', async () => {
+    await dynamicClusterTestLessUsed()
+  }),
+  Benchmark.add('Poolifier:Dynamic:ClusterPool:LessBusy', async () => {
+    await dynamicClusterTestLessBusy()
   }),
   Benchmark.add(
     'Poolifier:Dynamic:ClusterPool:WeightedRoundRobin',
     async () => {
-      await dynamicClusterTestWeightedRoundRobin
+      await dynamicClusterTestWeightedRoundRobin()
     }
   ),
   Benchmark.add('Poolifier:Dynamic:ClusterPool:FairShare', async () => {