@cargolift-cdi/types 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/db/entities/diagnostic-latency.entity.d.ts +0 -1
- package/dist/db/entities/diagnostic-latency.entity.d.ts.map +1 -1
- package/dist/db/entities/diagnostic-latency.entity.js +0 -4
- package/dist/db/repository/diagnostic-latency-repository.service.d.ts +1 -1
- package/dist/db/repository/diagnostic-latency-repository.service.d.ts.map +1 -1
- package/dist/db/repository/diagnostic-latency-repository.service.js +3 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic-latency.entity.d.ts","sourceRoot":"","sources":["../../../src/db/entities/diagnostic-latency.entity.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qBACa,iBAAiB;IAE5B,EAAE,EAAG,MAAM,CAAC;IAGZ,
|
|
1
|
+
{"version":3,"file":"diagnostic-latency.entity.d.ts","sourceRoot":"","sources":["../../../src/db/entities/diagnostic-latency.entity.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qBACa,iBAAiB;IAE5B,EAAE,EAAG,MAAM,CAAC;IAGZ,aAAa,EAAG,MAAM,CAAC;IAGvB,eAAe,EAAG,IAAI,CAAC;IAGvB,aAAa,EAAG,IAAI,CAAC;IAGrB,SAAS,EAAG,MAAM,CAAC;IAGnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B"}
|
|
@@ -12,7 +12,6 @@ import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
|
12
12
|
*/
|
|
13
13
|
let DiagnosticLatency = class DiagnosticLatency {
|
|
14
14
|
id;
|
|
15
|
-
testId;
|
|
16
15
|
correlationId;
|
|
17
16
|
timestamp_start;
|
|
18
17
|
timestamp_end;
|
|
@@ -22,9 +21,6 @@ let DiagnosticLatency = class DiagnosticLatency {
|
|
|
22
21
|
__decorate([
|
|
23
22
|
PrimaryGeneratedColumn({ type: 'int' })
|
|
24
23
|
], DiagnosticLatency.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
Column({ type: 'varchar', length: 36 })
|
|
27
|
-
], DiagnosticLatency.prototype, "testId", void 0);
|
|
28
24
|
__decorate([
|
|
29
25
|
Column({ type: 'varchar', default: 36 })
|
|
30
26
|
], DiagnosticLatency.prototype, "correlationId", void 0);
|
|
@@ -14,6 +14,6 @@ export declare class DiagnosticLatencyRepositoryService {
|
|
|
14
14
|
* @param timestamp_start
|
|
15
15
|
* @returns
|
|
16
16
|
*/
|
|
17
|
-
create(
|
|
17
|
+
create(correlation_id: string, timestamp_start: Date, timestamp_end: Date, data?: Record<string, any>): Promise<DiagnosticLatency>;
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=diagnostic-latency-repository.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic-latency-repository.service.d.ts","sourceRoot":"","sources":["../../../src/db/repository/diagnostic-latency-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E;;;GAGG;AACH,qBACa,kCAAkC;IAG3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAGtD;;;;;;OAMG;IACG,MAAM,CACV,
|
|
1
|
+
{"version":3,"file":"diagnostic-latency-repository.service.d.ts","sourceRoot":"","sources":["../../../src/db/repository/diagnostic-latency-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E;;;GAGG;AACH,qBACa,kCAAkC;IAG3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAGtD;;;;;;OAMG;IACG,MAAM,CACV,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,IAAI,EACrB,aAAa,EAAE,IAAI,EACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACzB,OAAO,CAAC,iBAAiB,CAAC;CAc9B"}
|
|
@@ -26,14 +26,12 @@ let DiagnosticLatencyRepositoryService = class DiagnosticLatencyRepositoryServic
|
|
|
26
26
|
* @param timestamp_start
|
|
27
27
|
* @returns
|
|
28
28
|
*/
|
|
29
|
-
async create(
|
|
30
|
-
const now = new Date();
|
|
29
|
+
async create(correlation_id, timestamp_start, timestamp_end, data) {
|
|
31
30
|
const entity = this.repo.create({
|
|
32
|
-
testId,
|
|
33
31
|
correlationId: correlation_id,
|
|
34
32
|
timestamp_start,
|
|
35
|
-
timestamp_end
|
|
36
|
-
latencyMs:
|
|
33
|
+
timestamp_end,
|
|
34
|
+
latencyMs: timestamp_end.getTime() - timestamp_start.getTime(),
|
|
37
35
|
data
|
|
38
36
|
});
|
|
39
37
|
return this.repo.save(entity);
|