X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FStatistics.ts;h=628ad28b6d150a582acacd875dd575dd18c5d5e5;hb=6c1761d470507ea23d186be61b94ca7375c5144a;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..628ad28b 100644 --- a/src/types/Statistics.ts +++ b/src/types/Statistics.ts @@ -1,11 +1,17 @@ -import { CircularArray } from '../utils/CircularArray'; +import type { CircularArray } from '../utils/CircularArray'; +import type { WorkerData } from './Worker'; + +export interface TimeSeries { + timestamp: number; + value: number; +} export interface StatisticsData { countRequest: number; countResponse: number; countError: number; countTimeMeasurement: number; - timeMeasurementSeries: CircularArray; + timeMeasurementSeries: CircularArray; currentTimeMeasurement: number; minTimeMeasurement: number; maxTimeMeasurement: number; @@ -16,10 +22,11 @@ export interface StatisticsData { stdDevTimeMeasurement: number; } -export default interface Statistics { +export default interface Statistics extends WorkerData { id: string; - URI: string; + name: string; + uri: string; createdAt: Date; - lastUpdatedAt?: Date; - statisticsData: Record; + updatedAt?: Date; + statisticsData: Map>; }