fix: fix performance statistics formatting in log messages
[e-mobility-charging-stations-simulator.git] / src / performance / PerformanceStatistics.ts
index 88bb29d04d97d9aa315df258dc0923334d803d1e..3bb72ffa5f711b2b6c3c2af6d3e2501454503f45 100644 (file)
@@ -14,6 +14,7 @@ import {
   MessageType,
   type RequestCommand,
   type Statistics,
+  type StatisticsData,
   type StorageConfiguration,
   type TimestampedData
 } from '../types/index.js'
@@ -204,7 +205,9 @@ export class PerformanceStatistics {
   private logStatistics (): void {
     logger.info(this.logPrefix(), {
       ...this.statistics,
-      statisticsData: JSONStringifyWithMapSupport(this.statistics.statisticsData)
+      statisticsData: JSON.parse(
+        JSONStringifyWithMapSupport(this.statistics.statisticsData)
+      ) as Map<string | RequestCommand | IncomingRequestCommand, StatisticsData>
     })
   }