X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FStatistics.ts;h=37460aee97cb0382cc322a4f8745d77204045d1e;hb=953d6b028e82d6997897802afefbb4ce0d225dee;hp=0ee58f750e2809c7d8e1d81cc119b0f237cb67ed;hpb=c27c3eeea356b0692bef2327bb59aa99f9cbad8d;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Statistics.ts b/src/types/Statistics.ts index 0ee58f75..37460aee 100644 --- a/src/types/Statistics.ts +++ b/src/types/Statistics.ts @@ -1,11 +1,18 @@ -import { CircularArray } from '../utils/CircularArray'; +import type { CircularArray } from '../utils/CircularArray'; +import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests'; +import type { WorkerData } from './Worker'; -export interface StatisticsData { +export type TimeSeries = { + timestamp: number; + value: number; +}; + +export type StatisticsData = { countRequest: number; countResponse: number; countError: number; countTimeMeasurement: number; - timeMeasurementSeries: CircularArray; + timeMeasurementSeries: CircularArray; currentTimeMeasurement: number; minTimeMeasurement: number; maxTimeMeasurement: number; @@ -14,12 +21,13 @@ export interface StatisticsData { medTimeMeasurement: number; ninetyFiveThPercentileTimeMeasurement: number; stdDevTimeMeasurement: number; -} +}; -export default interface Statistics { +export type Statistics = WorkerData & { id: string; - URI: string; + name: string; + uri: string; createdAt: Date; - lastUpdatedAt?: Date; - statisticsData: Record; -} + updatedAt?: Date; + statisticsData: Map>; +};