X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FCommandStatistics.ts;h=84f2bdcae5634204f22e483f6ff4e1ffa9260a38;hb=8bbe7426a07c159108c9cb1f69d3fe6b5cef5fe9;hp=7a4579b7b47226a00d72fb798566da601ac0318b;hpb=63b48f776a09ac5a5ffb5b161c108e3ca625a3cb;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/CommandStatistics.ts b/src/types/CommandStatistics.ts index 7a4579b7..84f2bdca 100644 --- a/src/types/CommandStatistics.ts +++ b/src/types/CommandStatistics.ts @@ -1,14 +1,28 @@ +import CircularArray from '../utils/CircularArray'; +import { EntryType } from 'perf_hooks'; + +export interface PerfEntry { + name: string; + entryType: EntryType; + startTime: number; + duration: number; +} + export interface CommandStatisticsData { countRequest: number; countResponse: number; countError: number; - countTime: number; - minTime: number; - maxTime: number; - totalTime: number; - avgTime: number; + countTimeMeasurement: number; + timeMeasurementSeries: CircularArray; + currentTimeMeasurement: number; + minTimeMeasurement: number; + maxTimeMeasurement: number; + totalTimeMeasurement: number; + avgTimeMeasurement: number; + medTimeMeasurement: number; } export default interface CommandStatistics { - [command: string]: CommandStatisticsData; + id: string; + commandsStatisticsData: Record; }