refactor: only copy assets used at runtime in the bundle
[e-mobility-charging-stations-simulator.git] / src / performance / PerformanceStatistics.ts
index c25cde0d1816de3a6ef2fb826538cbff4026930a..61ef1b012946319ac1080fac1d9ca89b672fefd9 100644 (file)
@@ -4,7 +4,6 @@ import { type PerformanceEntry, PerformanceObserver, performance } from 'node:pe
 import type { URL } from 'node:url';
 import { parentPort } from 'node:worker_threads';
 
-import { MessageChannelUtils } from '../charging-station';
 import {
   type IncomingRequestCommand,
   MessageType,
@@ -12,7 +11,14 @@ import {
   type Statistics,
   type TimeSeries,
 } from '../types';
-import { CircularArray, Configuration, Constants, Utils, logger } from '../utils';
+import {
+  CircularArray,
+  Configuration,
+  Constants,
+  MessageChannelUtils,
+  Utils,
+  logger,
+} from '../utils';
 
 export class PerformanceStatistics {
   private static readonly instances: Map<string, PerformanceStatistics> = new Map<
@@ -72,7 +78,7 @@ export class PerformanceStatistics {
           this.statistics.statisticsData.has(command) &&
           this.statistics.statisticsData.get(command)?.countRequest
         ) {
-          this.statistics.statisticsData.get(command).countRequest++;
+          ++this.statistics.statisticsData.get(command).countRequest;
         } else {
           this.statistics.statisticsData.set(command, {
             ...this.statistics.statisticsData.get(command),
@@ -85,7 +91,7 @@ export class PerformanceStatistics {
           this.statistics.statisticsData.has(command) &&
           this.statistics.statisticsData.get(command)?.countResponse
         ) {
-          this.statistics.statisticsData.get(command).countResponse++;
+          ++this.statistics.statisticsData.get(command).countResponse;
         } else {
           this.statistics.statisticsData.set(command, {
             ...this.statistics.statisticsData.get(command),
@@ -98,7 +104,7 @@ export class PerformanceStatistics {
           this.statistics.statisticsData.has(command) &&
           this.statistics.statisticsData.get(command)?.countError
         ) {
-          this.statistics.statisticsData.get(command).countError++;
+          ++this.statistics.statisticsData.get(command).countError;
         } else {
           this.statistics.statisticsData.set(command, {
             ...this.statistics.statisticsData.get(command),