X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fstart.ts;h=e841b57ec63692d173ea6f8e9d69703be546e668;hb=ef6076c1764c5e4a8fcd6adcec68aa72b2a64ac4;hp=1c91dea361f5e5b9224ce6f8d6529e5758d524b4;hpb=eb3937cbf02c9f5000d7466afef0036639a3ddc4;p=e-mobility-charging-stations-simulator.git diff --git a/src/start.ts b/src/start.ts index 1c91dea3..e841b57e 100644 --- a/src/start.ts +++ b/src/start.ts @@ -6,6 +6,7 @@ class Bootstrap { static start() { try { let numStationsTotal = 0; + let numConcurrentWorkers = 0; // Start each ChargingStation object in a worker thread if (Configuration.getStationTemplateURLs()) { Configuration.getStationTemplateURLs().forEach((stationURL: StationTemplateURL) => { @@ -18,6 +19,7 @@ class Bootstrap { templateFile: stationURL.file, }, numStationsTotal); worker.start().catch(() => {}); + numConcurrentWorkers = worker.concurrentWorkers; } } catch (error) { // eslint-disable-next-line no-console @@ -30,7 +32,7 @@ class Bootstrap { if (numStationsTotal === 0) { console.log('No charging station template enabled in configuration, exiting'); } else { - console.log('Charging station simulator started with ' + numStationsTotal.toString() + ' charging station(s)'); + console.log('Charging station simulator started with ' + numStationsTotal.toString() + ' charging station(s) of ' + numConcurrentWorkers.toString() + ' concurrently running'); } } catch (error) { // eslint-disable-next-line no-console