fix: flag dynamic pool mode as experimental
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 00:41:48 +0000 (02:41 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 00:41:48 +0000 (02:41 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
README.md
src/charging-station/Bootstrap.ts
src/worker/WorkerTypes.ts

index dbf0533e9b89ba74547a03e96f8e8e572d905be2..58b18004d02b6abbf990c3e7a32c8a525c314230 100644 (file)
--- a/README.md
+++ b/README.md
@@ -116,7 +116,7 @@ But the modifications to test have to be done to the files in the build target d
 - **staticPool**:
   Statically sized worker pool executing a static total number of simulated charging stations
 
-- **dynamicPool**:
+- **dynamicPool** (experimental):
   Dynamically sized worker pool executing a static total number of simulated charging stations
 
 ### Charging station configuration template
index e329a65b4e32ffa1018aa6b01a35b32ffacd0649..1b4934edcc9c39127cc53bb349f25904f22590a7 100644 (file)
@@ -142,6 +142,12 @@ export class Bootstrap extends EventEmitter {
             }`
           )
         );
+        Configuration.workerDynamicPoolInUse() &&
+          console.warn(
+            chalk.yellow(
+              'Charging stations simulator is using dynamic pool mode. This is an experimental feature with known issues.\nPlease consider using static pool or worker set mode instead'
+            )
+          );
         console.info(chalk.green('Worker set/pool information:'), this.workerImplementation?.info);
         this.started = true;
         this.starting = false;
index 3986164bfb82471657cdc7f5188216f890ddb4d6..5bf339fb976677ef3a8e275b399330758ecdea75 100644 (file)
@@ -4,6 +4,7 @@ import { type PoolEvent, PoolEvents, type ThreadPoolOptions } from 'poolifier';
 
 export enum WorkerProcessType {
   workerSet = 'workerSet',
+  /** @experimental */
   dynamicPool = 'dynamicPool',
   staticPool = 'staticPool',
 }