Cleanup tests code
[poolifier.git] / README.md
index 7e89e90fe2a76c461262796fc2345a5eec093f76..9c67d340c2dca6f057a3ce7c31b00d1f44630609 100644 (file)
--- a/README.md
+++ b/README.md
@@ -11,8 +11,8 @@
 <p align="center">
   <a href="https://www.npmjs.com/package/poolifier">
     <img alt="Weekly Downloads" src="https://img.shields.io/npm/dw/poolifier"></a>
-  <a href="https://github.com/pioardi/node-pool/actions">
-    <img alt="Actions Status" src="https://github.com/pioardi/node-pool/workflows/NodeCI/badge.svg"></a>
+  <a href="https://github.com/poolifier/poolifier/actions">
+    <img alt="Actions Status" src="https://github.com/poolifier/poolifier/workflows/NodeCI/badge.svg"></a>
   <a href="https://sonarcloud.io/dashboard?id=pioardi_poolifier">
     <img alt="Quality Gate Status" src="https://sonarcloud.io/api/project_badges/measure?project=pioardi_poolifier&metric=alert_status"></a>
   <a href="https://sonarcloud.io/component_measures/metric/coverage/list?id=pioardi_poolifier">
@@ -21,8 +21,8 @@
     <img alt="Javascript Standard Style Guide" src="https://img.shields.io/badge/code_style-standard-brightgreen.svg"></a>
   <a href="https://gitter.im/poolifier/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge">
     <img alt="Gitter chat" src="https://badges.gitter.im/poolifier/community.svg"></a>
-  <a href="https://badgen.net/dependabot/dependabot/dependabot-core/?icon=dependabot">
-    <img alt="Dependabot" src="https://badgen.net/dependabot/dependabot/dependabot-core/?icon=dependabot"></a>
+  <a href="https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot">
+    <img alt="Dependabot" src="https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot"></a>
   <a href="http://makeapullrequest.com">
     <img alt="PR Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square"></a>
   <a href="https://img.shields.io/static/v1?label=dependencies&message=no%20dependencies&color=brightgreen">
@@ -65,7 +65,7 @@ Please consult our <a href="#general-guidance">general guidelines</a>
   <span> · </span>
   <a href="#usage">Usage</a>
   <span> · </span>
-  <a href="#node-versions">  Node versions</a>
+  <a href="#node-versions">Node versions</a>
   <span> · </span>
   <a href="#api">API</a>
   <span> · </span>
@@ -146,7 +146,7 @@ Remember that workers can only send and receive serializable data.
 
 ## Node versions
 
-You can use node versions 12.x, 13.x, 14.x, 16.x
+You can use node versions >= 12.x for thread pool, and node versions >= 16.x for cluster pool.
 
 ## API
 
@@ -160,10 +160,14 @@ You can use node versions 12.x, 13.x, 14.x, 16.x
 - `onlineHandler` (optional) - A function that will listen for online event on each worker
 - `exitHandler` (optional) - A function that will listen for exit event on each worker
 - `workerChoiceStrategy` (optional) - The work choice strategy to use in this pool:
+
   - `WorkerChoiceStrategies.ROUND_ROBIN`: Submit tasks to worker in this pool in a round robbin fashion
-  - `WorkerChoiceStrategies.LESS_RECENTLY_USED`: Submit tasks to the less recently used worker in the pool  
-  
+  - `WorkerChoiceStrategies.LESS_RECENTLY_USED`: Submit tasks to the less recently used worker in the pool
+  - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` Submit tasks to worker using a weighted round robin scheduling algorithm based on tasks execution time for now
+  - `WorkerChoiceStrategies.FAIR_SHARE`: Submit tasks to worker using a fair share tasks scheduling algorithm
+
   Default: `WorkerChoiceStrategies.ROUND_ROBIN`
+
 - `enableEvents` (optional) - Events emission enablement in this pool. Default: true
 
 ### `pool = new DynamicThreadPool/DynamicClusterPool(min, max, filePath, opts)`
@@ -192,7 +196,7 @@ This method will call the terminate method on each worker.
   The last active time of your worker unit will be updated when a task is submitted to a worker or when a worker terminate a task.  
   If `killBehavior` is set to `KillBehaviors.HARD` this value represents also the timeout for the tasks that you submit to the pool, when this timeout expires your tasks is interrupted and the worker is killed if is not part of the minimum size of the pool.  
   If `killBehavior` is set to `KillBehaviors.SOFT` your tasks have no timeout and your workers will not be terminated until your task is completed.  
-  Default: 60.000 ms
+  Default: 60000 ms
 
 - `async` - true/false, true if your function contains async pieces else false
 - `killBehavior` - Dictates if your async unit (worker/process) will be deleted in case that a task is active on it.  
@@ -242,13 +246,11 @@ But in general, **always profile your application**
 ## Contribute
 
 See guidelines [CONTRIBUTING](CONTRIBUTING.md)  
-Choose your task here [2.0.0](https://github.com/pioardi/poolifier/projects/1), propose an idea, a fix, an improvement.
+Choose your task here [2.3.0](https://github.com/orgs/poolifier/projects/1), propose an idea, a fix, an improvement.
 
 ## Team
 
 <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
-<!-- prettier-ignore-start -->
-<!-- markdownlint-disable -->
 
 **Creator/Owner:**