README.md: spell fix
[e-mobility-charging-stations-simulator.git] / src / utils / PerformanceStatistics.ts
index 513c4ff17ec7aad82b95f779603849a8a28f109d..0c68fa73027b1169886394abc191a7fc2e73723f 100644 (file)
@@ -59,11 +59,12 @@ export default class PerformanceStatistics {
 
   public logPerformance(entry: PerformanceEntry, className: string): void {
     this.addPerformanceTimer(entry.name as RequestCommand | IncomingRequestCommand, entry.duration);
-    const perfEntry: PerfEntry = {} as PerfEntry;
-    perfEntry.name = entry.name;
-    perfEntry.entryType = entry.entryType;
-    perfEntry.startTime = entry.startTime;
-    perfEntry.duration = entry.duration;
+    const perfEntry: PerfEntry = {
+      name: entry.name,
+      entryType: entry.entryType,
+      startTime: entry.startTime,
+      duration: entry.duration
+    } ;
     logger.info(`${this.logPrefix()} ${className} method(s) entry: %j`, perfEntry);
   }
 
@@ -112,13 +113,13 @@ export default class PerformanceStatistics {
 
   private addPerformanceTimer(command: RequestCommand | IncomingRequestCommand, duration: number): void {
     // Map to proper command name
-    const MAPCOMMAND = {
+    const MAP_COMMAND = {
       sendMeterValues: RequestCommand.METER_VALUES,
       startTransaction: RequestCommand.START_TRANSACTION,
       stopTransaction: RequestCommand.STOP_TRANSACTION,
     };
-    if (MAPCOMMAND[command]) {
-      command = MAPCOMMAND[command] as RequestCommand | IncomingRequestCommand;
+    if (MAP_COMMAND[command]) {
+      command = MAP_COMMAND[command] as RequestCommand | IncomingRequestCommand;
     }
     // Initialize command statistics
     if (!this.commandsStatistics.commandsStatisticsData[command]) {