Skip to content

Commit c9065c5

Browse files
ci(profiling): cleanup correctness tests (#2702)
* Add missing labels for timeline * format json
1 parent 65bf25c commit c9065c5

File tree

6 files changed

+234
-206
lines changed

6 files changed

+234
-206
lines changed
Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
2-
"test_name": "php_allocations",
3-
"stacks": [
2+
"test_name": "php_allocations",
3+
"stacks": [
4+
{
5+
"profile-type": "alloc-size",
6+
"stack-content": [
47
{
5-
"profile-type": "alloc-size",
6-
"stack-content": [
7-
{
8-
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
9-
"percent": 66,
10-
"value": 1248240336,
11-
"error_margin": 5
12-
},
13-
{
14-
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
15-
"percent": 33,
16-
"value": 613620616,
17-
"error_margin": 5
18-
}
19-
]
8+
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
9+
"percent": 66,
10+
"value": 1248240336,
11+
"error_margin": 5
2012
},
2113
{
22-
"profile-type": "alloc-samples",
23-
"stack-content": [
24-
{
25-
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
26-
"percent": 50,
27-
"error_margin": 5
28-
},
29-
{
30-
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
31-
"percent": 50,
32-
"error_margin": 5
33-
}
34-
]
14+
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
15+
"percent": 33,
16+
"value": 613620616,
17+
"error_margin": 5
3518
}
36-
]
19+
]
20+
},
21+
{
22+
"profile-type": "alloc-samples",
23+
"stack-content": [
24+
{
25+
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
26+
"percent": 50,
27+
"error_margin": 5
28+
},
29+
{
30+
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
31+
"percent": 50,
32+
"error_margin": 5
33+
}
34+
]
35+
}
36+
]
3737
}
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"test_name": "php_exception",
3-
"stacks": [
2+
"test_name": "php_exception",
3+
"stacks": [
4+
{
5+
"profile-type": "exception-samples",
6+
"stack-content": [
47
{
5-
"profile-type": "exception-samples",
6-
"stack-content": [
7-
{
8-
"regular_expression": "<\\?php;FooBar\\\\throwAndCatch",
9-
"percent": 100,
10-
"labels": [
11-
{
12-
"key": "exception type",
13-
"values": [
14-
"FooBar\\Exception"
15-
]
16-
},
17-
{
18-
"key": "thread id",
19-
"values_regex": "^[0-9]+$"
20-
}
21-
]
22-
}
23-
]
8+
"regular_expression": "<\\?php;FooBar\\\\throwAndCatch",
9+
"percent": 100,
10+
"labels": [
11+
{
12+
"key": "exception type",
13+
"values": [
14+
"FooBar\\Exception"
15+
]
16+
},
17+
{
18+
"key": "thread id",
19+
"values_regex": "^[0-9]+$"
20+
}
21+
]
2422
}
25-
]
23+
]
24+
}
25+
]
2626
}
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
2-
"test_name": "php_exception_zts",
3-
"stacks": [
2+
"test_name": "php_exception_zts",
3+
"stacks": [
4+
{
5+
"profile-type": "exception-samples",
6+
"stack-content": [
47
{
5-
"profile-type": "exception-samples",
6-
"stack-content": [
7-
{
8-
"regular_expression": "<\\?php|{closure}",
9-
"percent": 100,
10-
"labels": [
11-
{
12-
"key": "exception type",
13-
"values": [
14-
"Exception"
15-
]
16-
},
17-
{
18-
"key": "exception message",
19-
"values_regex": "Exception from (worker [0-9]|main thread)"
20-
},
21-
{
22-
"key": "thread id",
23-
"values_regex": "^[0-9]+$"
24-
}
25-
]
26-
}
27-
]
8+
"regular_expression": "<\\?php|{closure}",
9+
"percent": 100,
10+
"labels": [
11+
{
12+
"key": "exception type",
13+
"values": [
14+
"Exception"
15+
]
16+
},
17+
{
18+
"key": "exception message",
19+
"values_regex": "Exception from (worker [0-9]|main thread)"
20+
},
21+
{
22+
"key": "thread id",
23+
"values_regex": "^[0-9]+$"
24+
}
25+
]
2826
}
29-
]
27+
]
28+
}
29+
]
3030
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"test_name": "php_strange_frames",
3-
"stacks": [
2+
"test_name": "php_strange_frames",
3+
"stacks": [
4+
{
5+
"profile-type": "sample",
6+
"stack-content": [
47
{
5-
"profile-type": "sample",
6-
"stack-content": [
7-
{
8-
"regular_expression": "<?php;main;Datadog\\\\Test\\\\Class1::method1;class@anonymous.*::__invoke;Datadog\\\\Test\\\\Class1::Datadog\\\\Test\\\\\\{closure\\};datadog-profiling\\|Datadog\\\\Profiling\\\\trigger_time_sample",
9-
"percent": 100,
10-
"error_margin": 1
11-
}
12-
]
8+
"regular_expression": "<?php;main;Datadog\\\\Test\\\\Class1::method1;class@anonymous.*::__invoke;Datadog\\\\Test\\\\Class1::Datadog\\\\Test\\\\\\{closure\\};datadog-profiling\\|Datadog\\\\Profiling\\\\trigger_time_sample",
9+
"percent": 100,
10+
"error_margin": 1
1311
}
14-
]
12+
]
13+
}
14+
]
1515
}

profiling/tests/correctness/time.json

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
{
2-
"test_name": "php_time",
3-
"stacks": [
2+
"test_name": "php_time",
3+
"stacks": [
4+
{
5+
"profile-type": "wall-time",
6+
"stack-content": [
47
{
5-
"profile-type": "wall-time",
6-
"stack-content": [
7-
{
8-
"regular_expression": "<?php;main;a$",
9-
"percent": 17,
10-
"error_margin": 10
11-
},
12-
{
13-
"regular_expression": "<?php;main;b$",
14-
"percent": 33,
15-
"error_margin": 10
16-
},
17-
{
18-
"regular_expression": "<?php;main;standard\\|sleep$",
19-
"percent": 50,
20-
"error_margin": 10
21-
}
22-
]
8+
"regular_expression": "<?php;main;a$",
9+
"percent": 17,
10+
"error_margin": 10
2311
},
2412
{
25-
"profile-type": "cpu-time",
26-
"stack-content": [
27-
{
28-
"regular_expression": "<?php;main;a$",
29-
"percent": 33,
30-
"error_margin": 10
31-
},
32-
{
33-
"regular_expression": "<?php;main;b$",
34-
"percent": 66,
35-
"error_margin": 10
36-
},
37-
{
38-
"regular_expression": "<?php;main;standard\\|sleep$",
39-
"percent": 1,
40-
"error_margin": 10
41-
}
42-
]
13+
"regular_expression": "<?php;main;b$",
14+
"percent": 33,
15+
"error_margin": 10
16+
},
17+
{
18+
"regular_expression": "<?php;main;standard\\|sleep$",
19+
"percent": 50,
20+
"error_margin": 10
21+
}
22+
]
23+
},
24+
{
25+
"profile-type": "cpu-time",
26+
"stack-content": [
27+
{
28+
"regular_expression": "<?php;main;a$",
29+
"percent": 33,
30+
"error_margin": 10
31+
},
32+
{
33+
"regular_expression": "<?php;main;b$",
34+
"percent": 66,
35+
"error_margin": 10
36+
},
37+
{
38+
"regular_expression": "<?php;main;standard\\|sleep$",
39+
"percent": 1,
40+
"error_margin": 10
4341
}
44-
]
42+
]
43+
}
44+
]
4545
}

0 commit comments

Comments
 (0)