repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf: use mnemonist CirculerBuffer
[e-mobility-charging-stations-simulator.git]
/
src
/
types
/
Statistics.ts
diff --git
a/src/types/Statistics.ts
b/src/types/Statistics.ts
index 0c7375d9c0ade1d0dcd8b19b856f6f439479af47..89511b0291ba22054c70b6f6583960f4ec4b8129 100644
(file)
--- 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 { WorkerData } from '../worker/index.js'
+import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests.js'
export interface TimestampedData {
timestamp: number
export interface TimestampedData {
timestamp: number
@@
-12,7
+13,7
@@
export type StatisticsData = Partial<{
responseCount: number
errorCount: number
timeMeasurementCount: number
responseCount: number
errorCount: number
timeMeasurementCount: number
- measurementTimeSeries: Circular
Array
<TimestampedData>
+ measurementTimeSeries: Circular
Buffer
<TimestampedData>
currentTimeMeasurement: number
minTimeMeasurement: number
maxTimeMeasurement: number
currentTimeMeasurement: number
minTimeMeasurement: number
maxTimeMeasurement: number
@@
-23,17
+24,18
@@
export type StatisticsData = Partial<{
stdDevTimeMeasurement: 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>
id: string
name: string
uri: string
createdAt: Date
updatedAt?: Date
statisticsData: Map<string | RequestCommand | IncomingRequestCommand, StatisticsData>
-}
& WorkerData
+}
-export interface
Internal
TemplateStatistics {
+export interface TemplateStatistics {
configured: number
configured: number
+ provisioned: number
added: number
started: number
indexes: Set<number>
added: number
started: number
indexes: Set<number>