X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FStatistics.ts;h=9601a90cb70e2ace501599190aba61f1d834c14a;hb=01b82de5b532cd149eccab7b82fe86a741289581;hp=0c7375d9c0ade1d0dcd8b19b856f6f439479af47;hpb=e82376450bef7a755869accf8f662826147832d8;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Statistics.ts b/src/types/Statistics.ts index 0c7375d9..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,17 +24,18 @@ 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 InternalTemplateStatistics { +export interface TemplateStatistics { configured: number + provisioned: number added: number started: number indexes: Set