})
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.bootNotificationResponse.currentTime = convertToDate(
- this.bootNotificationResponse.currentTime
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+ this.bootNotificationResponse?.currentTime
)!
if (!this.isRegistered()) {
this.stationInfo?.registrationMaxRetries !== -1 && ++registrationRetryCount
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { PerformanceRecord } from './PerformanceRecord.js'
@Entity()
export class PerformanceData {
- // @PrimaryKey()
- // pk!: number
- // @Property()
- // commandName!: string
- // @Property()
- // countRequest!: number
- // @Property()
- // countResponse!: number
- // @Property()
- // countError!: number
- // @Property()
- // countTimeMeasurement!: number
- // @Property()
- // timeMeasurementSeries!: number[]
- // @Property()
- // currentTimeMeasurement!: number
- // @Property()
- // minTimeMeasurement!: number
- // @Property()
- // maxTimeMeasurement!: number
- // @Property()
- // totalTimeMeasurement!: number
- // @Property()
- // avgTimeMeasurement!: number
- // @Property()
- // medTimeMeasurement!: number
- // @Property()
- // ninetyFiveThPercentileTimeMeasurement!: number
- // @Property()
- // stdDevTimeMeasurement!: number
- // @ManyToOne('PerformanceRecord')
- // performanceRecord!: PerformanceRecord
+ @PrimaryKey()
+ commandName!: string
+
+ @Property()
+ requestCount!: number
+
+ @Property()
+ responseCount!: number
+
+ @Property()
+ errorCount!: number
+
+ @Property()
+ timeMeasurementCount!: number
+
+ @Property()
+ measurementTimeSeries!: number[]
+
+ @Property()
+ currentTimeMeasurement!: number
+
+ @Property()
+ minTimeMeasurement!: number
+
+ @Property()
+ maxTimeMeasurement!: number
+
+ @Property()
+ totalTimeMeasurement!: number
+
+ @Property()
+ avgTimeMeasurement!: number
+
+ @Property()
+ medTimeMeasurement!: number
+
+ @Property()
+ ninetyFiveThPercentileTimeMeasurement!: number
+
+ @Property()
+ stdDevTimeMeasurement!: number
+
+ @ManyToOne(() => PerformanceRecord)
+ performanceRecord!: PerformanceRecord
}
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import type { PerformanceData } from './PerformanceData.js'
+import { PerformanceData } from './PerformanceData.js'
@Entity()
export class PerformanceRecord {
- // @PrimaryKey()
- // pk!: number
- // @Property()
- // id!: string
- // @Property()
- // URI!: string
- // @Property()
- // createdAt!: Date
- // @Property()
- // updatedAt?: Date
- // @OneToMany('PerformanceData', 'performanceRecord')
- // performanceData? = new Collection<PerformanceData>(this)
+ @PrimaryKey()
+ id!: string
+
+ @Property()
+ name!: string
+
+ @Property()
+ uri!: string
+
+ @Property()
+ createdAt!: Date
+
+ @Property()
+ updatedAt?: Date
+
+ @OneToMany(() => PerformanceData, performanceData => performanceData.performanceRecord)
+ performanceData? = new Collection<PerformanceData>(this)
}