-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
responseCount: number
errorCount: number
timeMeasurementCount: number
- measurementTimeSeries: CircularArray<TimestampedData>
+ measurementTimeSeries: CircularBuffer<TimestampedData> | TimestampedData[]
currentTimeMeasurement: number
minTimeMeasurement: number
maxTimeMeasurement: number
stdDevTimeMeasurement: number
}>
-export type Statistics = {
+export interface Statistics extends WorkerData {
id: string
name: string
uri: string
createdAt: Date
updatedAt?: Date
statisticsData: Map<string | RequestCommand | IncomingRequestCommand, StatisticsData>
-} & WorkerData
+}
-export interface InternalTemplateStatistics {
+export interface TemplateStatistics {
configured: number
+ provisioned: number
added: number
started: number
indexes: Set<number>