X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FStatistics.ts;h=44c941e70bee6e2b7ee828f657c75463a5ffef73;hb=c36e3cf0312f553b4b8c2b716da0d55cc87450cf;hp=fb9ededbfa99a5c63d2cc99dad3af0bfa59c2f71;hpb=6415403ce9894b9a1d7d5d5f698483e58463370f;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Statistics.ts b/src/types/Statistics.ts index fb9ededb..44c941e7 100644 --- a/src/types/Statistics.ts +++ b/src/types/Statistics.ts @@ -1,18 +1,18 @@ -import type { CircularArray } from '../utils/CircularArray'; import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests'; -import type { WorkerData } from './Worker'; +import type { CircularArray } from '../utils'; +import type { WorkerData } from '../worker'; -export type TimeSeries = { +export type TimestampedData = { timestamp: number; value: number; }; -export type StatisticsData = { - countRequest: number; - countResponse: number; - countError: number; - countTimeMeasurement: number; - timeMeasurementSeries: CircularArray; +type StatisticsData = Partial<{ + requestCount: number; + responseCount: number; + errorCount: number; + timeMeasurementCount: number; + measurementTimeSeries: CircularArray; currentTimeMeasurement: number; minTimeMeasurement: number; maxTimeMeasurement: number; @@ -21,7 +21,7 @@ export type StatisticsData = { medTimeMeasurement: number; ninetyFiveThPercentileTimeMeasurement: number; stdDevTimeMeasurement: number; -}; +}>; export type Statistics = { id: string; @@ -29,5 +29,5 @@ export type Statistics = { uri: string; createdAt: Date; updatedAt?: Date; - statisticsData: Map>; + statisticsData: Map; } & WorkerData;