UI protocol: cleanup version handling code
[e-mobility-charging-stations-simulator.git] / src / performance / PerformanceStatistics.ts
index c41b2d59a2e0d157758e7b37643f34d8e17f90ad..d3a174c076a2642ccaad247f4653d78bd48b8350 100644 (file)
@@ -1,13 +1,13 @@
 // Partial Copyright Jerome Benoit. 2021. All Rights Reserved.
 
 import { PerformanceEntry, PerformanceObserver, performance } from 'perf_hooks';
-import { URL } from 'url';
+import type { URL } from 'url';
 import { parentPort } from 'worker_threads';
 
 import { MessageChannelUtils } from '../charging-station/MessageChannelUtils';
 import { MessageType } from '../types/ocpp/MessageType';
-import { IncomingRequestCommand, RequestCommand } from '../types/ocpp/Requests';
-import Statistics, { StatisticsData, TimeSeries } from '../types/Statistics';
+import type { IncomingRequestCommand, RequestCommand } from '../types/ocpp/Requests';
+import type { Statistics, StatisticsData, TimeSeries } from '../types/Statistics';
 import { CircularArray, DEFAULT_CIRCULAR_ARRAY_SIZE } from '../utils/CircularArray';
 import Configuration from '../utils/Configuration';
 import logger from '../utils/Logger';
@@ -220,12 +220,7 @@ export default class PerformanceStatistics {
   }
 
   private addPerformanceEntryToStatistics(entry: PerformanceEntry): void {
-    let entryName = entry.name;
-    // Rename entry name
-    const MAP_NAME: Record<string, string> = {};
-    if (MAP_NAME[entryName]) {
-      entryName = MAP_NAME[entryName];
-    }
+    const entryName = entry.name;
     // Initialize command statistics
     if (!this.statistics.statisticsData.has(entryName)) {
       this.statistics.statisticsData.set(entryName, {});