Skip to content

Commit 9b45836

Browse files
Siwei Zhangbhufmann
authored andcommitted
Add parameter "properties" in model "Trace"
Add the parameter "properties" introduced by commit 499408e3979cab403a5d58 Signed-off-by: Siwei Zhang <siwei.zhang@ericsson.com>
1 parent 7fdc65b commit 9b45836

File tree

6 files changed

+28
-0
lines changed

6 files changed

+28
-0
lines changed

tsp-typescript-client/fixtures/tsp-client/create-experiment-0.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"nbEvents": 999999,
1414
"start": 1234567890123456789,
1515
"end": 9876543210987654321,
16+
"properties":
17+
{
18+
"hostname": "qemu1",
19+
"clock_offset": "1450192743562703624"
20+
},
1621
"indexingStatus": "COMPLETED"
1722
}
1823
]

tsp-typescript-client/fixtures/tsp-client/delete-experiment-0.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"nbEvents": 0,
1414
"start": 0,
1515
"end": 0,
16+
"properties":
17+
{
18+
"hostname": "qemu1",
19+
"clock_offset": "1450192743562703624"
20+
},
1621
"indexingStatus": "CLOSED"
1722
}
1823
]

tsp-typescript-client/fixtures/tsp-client/delete-trace-0.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@
55
"nbEvents": 0,
66
"start": 0,
77
"end": 0,
8+
"properties":
9+
{
10+
"hostname": "qemu1",
11+
"clock_offset": "1450192743562703624"
12+
},
813
"indexingStatus": "CLOSED"
914
}

tsp-typescript-client/fixtures/tsp-client/open-trace-0.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@
55
"nbEvents": 0,
66
"start": 0,
77
"end": 0,
8+
"properties":
9+
{
10+
"hostname": "qemu1",
11+
"clock_offset": "1450192743562703624"
12+
},
813
"indexingStatus": "CLOSED"
914
}

tsp-typescript-client/src/models/trace.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const Trace = createNormalizer<Trace>({
44
end: BigInt,
55
nbEvents: assertNumber,
66
start: BigInt,
7+
properties: undefined,
78
});
89

910
/**
@@ -40,6 +41,11 @@ export interface Trace {
4041
*/
4142
nbEvents: number;
4243

44+
/**
45+
* Trace's properties
46+
*/
47+
properties: Record<string, any>;
48+
4349
/**
4450
* Indicate if the indexing of the trace is completed or still running.
4551
* If it still running, the end time and number of events are not final

tsp-typescript-client/src/protocol/tsp-client.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ describe('HttpTspClient Deserialization', () => {
118118
expect(typeof trace.end).toEqual('bigint');
119119
expect(typeof trace.start).toEqual('bigint');
120120
expect(typeof trace.nbEvents).toEqual('number');
121+
expect(typeof trace.properties).toEqual('object');
121122
});
122123

123124
it('experimentOutputs', async () => {
@@ -400,6 +401,7 @@ describe('HttpTspClient Deserialization', () => {
400401
expect(typeof trace.end).toEqual('bigint');
401402
expect(typeof trace.nbEvents).toEqual('number');
402403
expect(typeof trace.start).toEqual('bigint');
404+
expect(typeof trace.properties).toEqual('object');
403405
});
404406

405407
it('configurationSourceTypes', async () => {

0 commit comments

Comments
 (0)