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
Convert Statistics interface to type
[e-mobility-charging-stations-simulator.git]
/
src
/
types
/
Statistics.ts
diff --git
a/src/types/Statistics.ts
b/src/types/Statistics.ts
index 00c73052f98d132de8bfc2dbb3a2bc81c444f00e..72f96696905165847155a305ddb8b4d5e3f8ab5b 100644
(file)
--- 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 StatisticsData {
+export type TimeSeries = {
+ timestamp: number;
+ value: number;
+};
+
+export type StatisticsData = {
countRequest: number;
countResponse: number;
countError: number;
countTimeMeasurement: number;
countRequest: number;
countResponse: number;
countError: number;
countTimeMeasurement: number;
- timeMeasurementSeries: CircularArray<
number
>;
+ timeMeasurementSeries: CircularArray<
TimeSeries
>;
currentTimeMeasurement: number;
minTimeMeasurement: number;
maxTimeMeasurement: number;
currentTimeMeasurement: number;
minTimeMeasurement: number;
maxTimeMeasurement: number;
@@
-14,12
+20,13
@@
export interface StatisticsData {
medTimeMeasurement: number;
ninetyFiveThPercentileTimeMeasurement: number;
stdDevTimeMeasurement: number;
medTimeMeasurement: number;
ninetyFiveThPercentileTimeMeasurement: number;
stdDevTimeMeasurement: number;
-}
+}
;
-export
default interface Statistics
{
+export
type Statistics = WorkerData &
{
id: string;
id: string;
- URI: string;
+ name: string;
+ uri: string;
createdAt: Date;
updatedAt?: Date;
statisticsData: Map<string, Partial<StatisticsData>>;
createdAt: Date;
updatedAt?: Date;
statisticsData: Map<string, Partial<StatisticsData>>;
-}
+}
;