From: Jérôme Benoit Date: Sun, 2 May 2021 20:33:58 +0000 (+0200) Subject: src/utils/PerformanceStatistics.ts: Use commands enum X-Git-Tag: v1.0.1-0~40 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b57115d885b67a95cc61452ce70b291a1eeb65a9;p=e-mobility-charging-stations-simulator.git src/utils/PerformanceStatistics.ts: Use commands enum Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/PerformanceStatistics.ts b/src/utils/PerformanceStatistics.ts index d7a4388e..515467a6 100644 --- a/src/utils/PerformanceStatistics.ts +++ b/src/utils/PerformanceStatistics.ts @@ -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;