src/utils/PerformanceStatistics.ts: Use commands enum
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 2 May 2021 20:33:58 +0000 (22:33 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 2 May 2021 20:33:58 +0000 (22:33 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/PerformanceStatistics.ts

index d7a4388edf3f95c7d6776c193e980064ba3c7e9d..515467a6078a12b9bac150dd0d5d0ce1b6ab8906 100644 (file)
@@ -113,9 +113,9 @@ export default class PerformanceStatistics {
   private addPerformanceTimer(command: RequestCommand | IncomingRequestCommand, duration: number): void {
     // Map to proper command name
     const MAPCOMMAND = {
-      sendMeterValues: 'MeterValues',
-      startTransaction: 'StartTransaction',
-      stopTransaction: 'StopTransaction',
+      sendMeterValues: RequestCommand.METERVALUES,
+      startTransaction: RequestCommand.START_TRANSACTION,
+      stopTransaction: RequestCommand.STOP_TRANSACTION,
     };
     if (MAPCOMMAND[command]) {
       command = MAPCOMMAND[command] as RequestCommand | IncomingRequestCommand;