X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FStatistics.ts;h=9601a90cb70e2ace501599190aba61f1d834c14a;hb=6c0215d2bf5a098aceed9e9d94d75d50ff2630db;hp=9bb614ee2654509daec9b1a90551a5e52650b9bd;hpb=66a7748ddeda8c94d7562a1ce58d440319654a4c;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Statistics.ts b/src/types/Statistics.ts index 9bb614ee..9601a90c 100644 --- a/src/types/Statistics.ts +++ b/src/types/Statistics.ts @@ -1,6 +1,7 @@ -import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests.js' -import type { CircularArray } from '../utils/index.js' +import type { CircularBuffer } from 'mnemonist' + import type { WorkerData } from '../worker/index.js' +import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests.js' export interface TimestampedData { timestamp: number @@ -12,7 +13,7 @@ export type StatisticsData = Partial<{ responseCount: number errorCount: number timeMeasurementCount: number - measurementTimeSeries: CircularArray + measurementTimeSeries: CircularBuffer | TimestampedData[] currentTimeMeasurement: number minTimeMeasurement: number maxTimeMeasurement: number @@ -23,11 +24,19 @@ export type StatisticsData = Partial<{ stdDevTimeMeasurement: number }> -export type Statistics = { +export interface Statistics extends WorkerData { id: string name: string uri: string createdAt: Date updatedAt?: Date statisticsData: Map -} & WorkerData +} + +export interface TemplateStatistics { + configured: number + provisioned: number + added: number + started: number + indexes: Set +}