Skip to content

Commit 06c76f3

Browse files
fix(ci): align python_alloc_3.14 expectations with observed profiles
Python 3.14 alloc profiles use Target.method stack frames and numeric thread IDs, so drop MainThread label assertions and update stack regexes.
1 parent a15b9f7 commit 06c76f3

2 files changed

Lines changed: 21 additions & 107 deletions

File tree

scenarios/python_alloc_3.14/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
## Allocation profiling (3.14 baseline)
22

33
Validates that the Datadog Python profiler's **memory collector** reports
4-
`alloc-space` and `alloc-samples` with correct call stacks and `thread name`
5-
labels. This is the **3.14 baseline** half of the `3.14 -> 3.15` migration pair
6-
(see `python_alloc_3.15`).
4+
`alloc-space` and `alloc-samples` with correct call stacks on Python 3.14
5+
(`Target.run` / `Target.allocate_memory_*` frames). This is the **3.14 baseline**
6+
half of the `3.14 -> 3.15` migration pair (see `python_alloc_3.15`).
77

88
Reuses the workload from `scenarios/python_basic_memory_3.11`: two allocation
99
sites with a 1:3 byte ratio (`allocate_memory_1` / `allocate_memory_2`).
1010
Stack and lock collectors are disabled to isolate allocation samples.
1111

1212
## Expected profile
1313

14-
Assertions match `python_basic_memory_3.11` (stable sampling proportions for
15-
`alloc-samples` and `alloc-space`).
14+
On 3.14, alloc stacks use `Target.method` frames (not bare `run;allocate_memory_*`).
15+
Alloc profiles use numeric thread IDs, so assertions omit `thread name` labels.
16+
Sampling proportions follow `python_basic_memory_3.11` (stable `alloc-samples`
17+
and `alloc-space` ratios).
1618

1719
## Notes
1820

scenarios/python_alloc_3.14/expected_profile.json

Lines changed: 14 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,14 @@
77
"pprof-regex": "",
88
"stack-content": [
99
{
10-
"regular_expression": "^\u003cmodule\u003e;run;allocate_memory_1.*$",
11-
"percent": 35,
12-
"error_margin": 5,
13-
"labels": [
14-
{
15-
"key": "thread name",
16-
"values": [
17-
"MainThread"
18-
],
19-
"values_regex": ""
20-
}
21-
]
22-
}
23-
]
24-
},
25-
{
26-
"profile-type": "alloc-samples",
27-
"pprof-regex": "",
28-
"stack-content": [
29-
{
30-
"regular_expression": "^\u003cmodule\u003e;run;allocate_memory_2.*$",
31-
"percent": 45,
32-
"error_margin": 5,
33-
"labels": [
34-
{
35-
"key": "thread name",
36-
"values": [
37-
"MainThread"
38-
],
39-
"values_regex": ""
40-
}
41-
]
42-
}
43-
]
44-
},
45-
{
46-
"profile-type": "alloc-samples",
47-
"pprof-regex": "",
48-
"stack-content": [
10+
"regular_expression": "^<module>;Target\\.run;Target\\.allocate_memory_1$",
11+
"percent": 33,
12+
"error_margin": 10
13+
},
4914
{
50-
"regular_expression": "^.*__init__;.*grow_list.*$",
51-
"percent": 19,
52-
"error_margin": 5,
53-
"labels": [
54-
{
55-
"key": "thread name",
56-
"values": [
57-
"MainThread"
58-
],
59-
"values_regex": ""
60-
}
61-
]
15+
"regular_expression": "^<module>;Target\\.run;Target\\.allocate_memory_2$",
16+
"percent": 44,
17+
"error_margin": 10
6218
}
6319
]
6420
},
@@ -67,58 +23,14 @@
6723
"pprof-regex": "",
6824
"stack-content": [
6925
{
70-
"regular_expression": "^\u003cmodule\u003e;run;allocate_memory_1.*$",
71-
"percent": 25,
72-
"error_margin": 5,
73-
"labels": [
74-
{
75-
"key": "thread name",
76-
"values": [
77-
"MainThread"
78-
],
79-
"values_regex": ""
80-
}
81-
]
82-
}
83-
]
84-
},
85-
{
86-
"profile-type": "alloc-space",
87-
"pprof-regex": "",
88-
"stack-content": [
89-
{
90-
"regular_expression": "^\u003cmodule\u003e;run;allocate_memory_2.*$",
91-
"percent": 75,
92-
"error_margin": 5,
93-
"labels": [
94-
{
95-
"key": "thread name",
96-
"values": [
97-
"MainThread"
98-
],
99-
"values_regex": ""
100-
}
101-
]
102-
}
103-
]
104-
},
105-
{
106-
"profile-type": "alloc-space",
107-
"pprof-regex": "",
108-
"stack-content": [
26+
"regular_expression": "^<module>;Target\\.run;Target\\.allocate_memory_1$",
27+
"percent": 30,
28+
"error_margin": 10
29+
},
10930
{
110-
"regular_expression": "^.*grow_list.*$",
111-
"percent": 3,
112-
"error_margin": 3,
113-
"labels": [
114-
{
115-
"key": "thread name",
116-
"values": [
117-
"MainThread"
118-
],
119-
"values_regex": ""
120-
}
121-
]
31+
"regular_expression": "^<module>;Target\\.run;Target\\.allocate_memory_2$",
32+
"percent": 40,
33+
"error_margin": 10
12234
}
12335
]
12436
}

0 commit comments

Comments
 (0)