File tree Expand file tree Collapse file tree
profiling/tests/correctness Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/time/test.pprof php -d extension=$PWD/target/release/libdatadog_php_profiling.so profiling/tests/correctness/time.php
5959 mkdir profiling/tests/correctness/strange_frames/
6060 DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/strange_frames/test.pprof php -d extension=$PWD/target/release/libdatadog_php_profiling.so profiling/tests/correctness/strange_frames.php
61+ mkdir profiling/tests/correctness/timeline/
62+ DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/timeline/test.pprof DD_PROFILING_EXPERIMENTAL_TIMELINE_ENABLED=1 php -d extension=$PWD/target/release/libdatadog_php_profiling.so profiling/tests/correctness/timeline.php
6163
6264 - name : Check profiler correctness for allocations
6365 uses : Datadog/prof-correctness/analyze@main
7678 with :
7779 expected_json : profiling/tests/correctness/strange_frames.json
7880 pprof_path : profiling/tests/correctness/strange_frames/
81+
82+ - name : Check profiler correctness for timeline
83+ uses : Datadog/prof-correctness/analyze@main
84+ with :
85+ expected_json : profiling/tests/correctness/timeline.json
86+ pprof_path : profiling/tests/correctness/timeline/
Original file line number Diff line number Diff line change 1+ {
2+ "test_name" : " php_timeline" ,
3+ "stacks" : [
4+ {
5+ "profile-type" : " timeline" ,
6+ "stack-content" : [
7+ {
8+ "regular_expression" : " ^\\ [gc\\ ]$" ,
9+ "percent" : 100 ,
10+ "error_margin" : 100 ,
11+ "labels" : [
12+ {
13+ "key" : " gc reason" ,
14+ "values" : [
15+ " induced"
16+ ]
17+ },
18+ {
19+ "key" : " event" ,
20+ "values" : [
21+ " gc"
22+ ]
23+ }
24+ ]
25+ },
26+ {
27+ "regular_expression" : " ^\\ [require\\ ]$" ,
28+ "percent" : 100 ,
29+ "error_margin" : 100 ,
30+ "labels" : [
31+ {
32+ "key" : " event" ,
33+ "values" : [
34+ " compilation"
35+ ]
36+ }
37+ ]
38+ },
39+ {
40+ "regular_expression" : " ^\\ [include\\ ]$" ,
41+ "percent" : 100 ,
42+ "error_margin" : 100 ,
43+ "labels" : [
44+ {
45+ "key" : " event" ,
46+ "values" : [
47+ " compilation"
48+ ]
49+ }
50+ ]
51+ }
52+ ]
53+ }
54+ ]
55+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ function foobar () {
4+ gc_collect_cycles ();
5+ }
6+
7+ include (__DIR__ .'/timeline_call.php ' );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ foobar ();
You can’t perform that action at this time.
0 commit comments