Added prettier standard to support prettier and use it in combination with standard
[poolifier.git] / benchmarks / bench.js
index 0dde5055f466161ca6c9863ddb2ed4b4436b8859..e0daca2d0aa84a85387f23414b884b1c57170f2d 100644 (file)
@@ -6,9 +6,15 @@ const size = 30
 const tasks = 1
 
 // pools
-const fixedPool = new FixedThreadPool(size,
-  './yourWorker.js', { maxTasks: 10000 })
-const dynamicPool = new DynamicThreadPool(size / 2, size * 3, './yourWorker.js', { maxTasks: 10000 })
+const fixedPool = new FixedThreadPool(size, './yourWorker.js', {
+  maxTasks: 10000
+})
+const dynamicPool = new DynamicThreadPool(
+  size / 2,
+  size * 3,
+  './yourWorker.js',
+  { maxTasks: 10000 }
+)
 const workerData = { proof: 'ok' }
 
 // wait some seconds before start, my pools need to load threads !!!
@@ -47,13 +53,14 @@ async function dynamicTest () {
 
 async function test () {
   // add tests
-  suite.add('PioardiStaticPool', async function () {
-    await fixedTest()
-  })
+  suite
+    .add('PioardiStaticPool', async function () {
+      await fixedTest()
+    })
     .add('PioardiDynamicPool', async function () {
       await dynamicTest()
     })
-  // add listeners
+    // add listeners
     .on('cycle', function (event) {
       console.log(String(event.target))
     })
@@ -61,6 +68,6 @@ async function test () {
       this.filter('fastest').map('name')
       console.log('Fastest is ' + this.filter('fastest').map('name'))
     })
-  // run async
+    // run async
     .run({ async: true })
 }