Debian Codegraph @

debian/patches/0005-Fix-collector-metrics-test-for-Go-1.25.patch

raw
1 From: Daniel Swarbrick <[email protected]>
2 Date: Tue, 30 Dec 2025 16:45:55 +0100
3 Subject: Fix collector metrics test for Go 1.25
4
5 Forwarded: not-needed
6 ---
7 prometheus/collectors/go_collector_go125_test.go | 240 +++++++++++++++++++++++
8 prometheus/go_collector_metrics_go125_test.go | 118 +++++++++++
9 2 files changed, 358 insertions(+)
10 create mode 100644 prometheus/collectors/go_collector_go125_test.go
11 create mode 100644 prometheus/go_collector_metrics_go125_test.go
12
13 diff --git a/prometheus/collectors/go_collector_go125_test.go b/prometheus/collectors/go_collector_go125_test.go
14 new file mode 100644
15 index 0000000..874f3ce
16 --- /dev/null
17 +++ b/prometheus/collectors/go_collector_go125_test.go
18 @@ -0,0 +1,240 @@
19 +// Copyright 2022 The Prometheus Authors
20 +// Licensed under the Apache License, Version 2.0 (the "License");
21 +// you may not use this file except in compliance with the License.
22 +// You may obtain a copy of the License at
23 +//
24 +// http://www.apache.org/licenses/LICENSE-2.0
25 +//
26 +// Unless required by applicable law or agreed to in writing, software
27 +// distributed under the License is distributed on an "AS IS" BASIS,
28 +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 +// See the License for the specific language governing permissions and
30 +// limitations under the License.
31 +
32 +//go:build go1.25 && !go1.26
33 +// +build go1.25,!go1.26
34 +
35 +package collectors
36 +
37 +func withAllMetrics() []string {
38 + return withBaseMetrics([]string{
39 + "go_cgo_go_to_c_calls_calls_total",
40 + "go_cpu_classes_gc_mark_assist_cpu_seconds_total",
41 + "go_cpu_classes_gc_mark_dedicated_cpu_seconds_total",
42 + "go_cpu_classes_gc_mark_idle_cpu_seconds_total",
43 + "go_cpu_classes_gc_pause_cpu_seconds_total",
44 + "go_cpu_classes_gc_total_cpu_seconds_total",
45 + "go_cpu_classes_idle_cpu_seconds_total",
46 + "go_cpu_classes_scavenge_assist_cpu_seconds_total",
47 + "go_cpu_classes_scavenge_background_cpu_seconds_total",
48 + "go_cpu_classes_scavenge_total_cpu_seconds_total",
49 + "go_cpu_classes_total_cpu_seconds_total",
50 + "go_cpu_classes_user_cpu_seconds_total",
51 + "go_gc_cycles_automatic_gc_cycles_total",
52 + "go_gc_cycles_forced_gc_cycles_total",
53 + "go_gc_cycles_total_gc_cycles_total",
54 + "go_gc_gogc_percent",
55 + "go_gc_gomemlimit_bytes",
56 + "go_gc_heap_allocs_by_size_bytes",
57 + "go_gc_heap_allocs_bytes_total",
58 + "go_gc_heap_allocs_objects_total",
59 + "go_gc_heap_frees_by_size_bytes",
60 + "go_gc_heap_frees_bytes_total",
61 + "go_gc_heap_frees_objects_total",
62 + "go_gc_heap_goal_bytes",
63 + "go_gc_heap_live_bytes",
64 + "go_gc_heap_objects_objects",
65 + "go_gc_heap_tiny_allocs_objects_total",
66 + "go_gc_limiter_last_enabled_gc_cycle",
67 + "go_gc_pauses_seconds",
68 + "go_gc_scan_globals_bytes",
69 + "go_gc_scan_heap_bytes",
70 + "go_gc_scan_stack_bytes",
71 + "go_gc_scan_total_bytes",
72 + "go_gc_stack_starting_size_bytes",
73 + "go_godebug_non_default_behavior_allowmultiplevcs_events_total",
74 + "go_godebug_non_default_behavior_asynctimerchan_events_total",
75 + "go_godebug_non_default_behavior_containermaxprocs_events_total",
76 + "go_godebug_non_default_behavior_embedfollowsymlinks_events_total",
77 + "go_godebug_non_default_behavior_execerrdot_events_total",
78 + "go_godebug_non_default_behavior_gocachehash_events_total",
79 + "go_godebug_non_default_behavior_gocachetest_events_total",
80 + "go_godebug_non_default_behavior_gocacheverify_events_total",
81 + "go_godebug_non_default_behavior_gotestjsonbuildtext_events_total",
82 + "go_godebug_non_default_behavior_gotypesalias_events_total",
83 + "go_godebug_non_default_behavior_http2client_events_total",
84 + "go_godebug_non_default_behavior_http2server_events_total",
85 + "go_godebug_non_default_behavior_httpcookiemaxnum_events_total",
86 + "go_godebug_non_default_behavior_httplaxcontentlength_events_total",
87 + "go_godebug_non_default_behavior_httpmuxgo121_events_total",
88 + "go_godebug_non_default_behavior_httpservecontentkeepheaders_events_total",
89 + "go_godebug_non_default_behavior_installgoroot_events_total",
90 + "go_godebug_non_default_behavior_multipartmaxheaders_events_total",
91 + "go_godebug_non_default_behavior_multipartmaxparts_events_total",
92 + "go_godebug_non_default_behavior_multipathtcp_events_total",
93 + "go_godebug_non_default_behavior_netedns0_events_total",
94 + "go_godebug_non_default_behavior_panicnil_events_total",
95 + "go_godebug_non_default_behavior_randautoseed_events_total",
96 + "go_godebug_non_default_behavior_randseednop_events_total",
97 + "go_godebug_non_default_behavior_rsa1024min_events_total",
98 + "go_godebug_non_default_behavior_tarinsecurepath_events_total",
99 + "go_godebug_non_default_behavior_tls10server_events_total",
100 + "go_godebug_non_default_behavior_tls3des_events_total",
101 + "go_godebug_non_default_behavior_tlsmaxrsasize_events_total",
102 + "go_godebug_non_default_behavior_tlsrsakex_events_total",
103 + "go_godebug_non_default_behavior_tlssha1_events_total",
104 + "go_godebug_non_default_behavior_tlsunsafeekm_events_total",
105 + "go_godebug_non_default_behavior_updatemaxprocs_events_total",
106 + "go_godebug_non_default_behavior_winreadlinkvolume_events_total",
107 + "go_godebug_non_default_behavior_winsymlink_events_total",
108 + "go_godebug_non_default_behavior_x509keypairleaf_events_total",
109 + "go_godebug_non_default_behavior_x509negativeserial_events_total",
110 + "go_godebug_non_default_behavior_x509rsacrt_events_total",
111 + "go_godebug_non_default_behavior_x509sha256skid_events_total",
112 + "go_godebug_non_default_behavior_x509usefallbackroots_events_total",
113 + "go_godebug_non_default_behavior_x509usepolicies_events_total",
114 + "go_godebug_non_default_behavior_zipinsecurepath_events_total",
115 + "go_memory_classes_heap_free_bytes",
116 + "go_memory_classes_heap_objects_bytes",
117 + "go_memory_classes_heap_released_bytes",
118 + "go_memory_classes_heap_stacks_bytes",
119 + "go_memory_classes_heap_unused_bytes",
120 + "go_memory_classes_metadata_mcache_free_bytes",
121 + "go_memory_classes_metadata_mcache_inuse_bytes",
122 + "go_memory_classes_metadata_mspan_free_bytes",
123 + "go_memory_classes_metadata_mspan_inuse_bytes",
124 + "go_memory_classes_metadata_other_bytes",
125 + "go_memory_classes_os_stacks_bytes",
126 + "go_memory_classes_other_bytes",
127 + "go_memory_classes_profiling_buckets_bytes",
128 + "go_memory_classes_total_bytes",
129 + "go_sched_gomaxprocs_threads",
130 + "go_sched_goroutines_goroutines",
131 + "go_sched_latencies_seconds",
132 + "go_sched_pauses_stopping_gc_seconds",
133 + "go_sched_pauses_stopping_other_seconds",
134 + "go_sched_pauses_total_gc_seconds",
135 + "go_sched_pauses_total_other_seconds",
136 + "go_sync_mutex_wait_total_seconds_total",
137 + })
138 +}
139 +
140 +func withGCMetrics() []string {
141 + return withBaseMetrics([]string{
142 + "go_gc_cycles_automatic_gc_cycles_total",
143 + "go_gc_cycles_forced_gc_cycles_total",
144 + "go_gc_cycles_total_gc_cycles_total",
145 + "go_gc_gogc_percent",
146 + "go_gc_gomemlimit_bytes",
147 + "go_gc_heap_allocs_by_size_bytes",
148 + "go_gc_heap_allocs_bytes_total",
149 + "go_gc_heap_allocs_objects_total",
150 + "go_gc_heap_frees_by_size_bytes",
151 + "go_gc_heap_frees_bytes_total",
152 + "go_gc_heap_frees_objects_total",
153 + "go_gc_heap_goal_bytes",
154 + "go_gc_heap_live_bytes",
155 + "go_gc_heap_objects_objects",
156 + "go_gc_heap_tiny_allocs_objects_total",
157 + "go_gc_limiter_last_enabled_gc_cycle",
158 + "go_gc_pauses_seconds",
159 + "go_gc_scan_globals_bytes",
160 + "go_gc_scan_heap_bytes",
161 + "go_gc_scan_stack_bytes",
162 + "go_gc_scan_total_bytes",
163 + "go_gc_stack_starting_size_bytes",
164 + })
165 +}
166 +
167 +func withMemoryMetrics() []string {
168 + return withBaseMetrics([]string{
169 + "go_memory_classes_heap_free_bytes",
170 + "go_memory_classes_heap_objects_bytes",
171 + "go_memory_classes_heap_released_bytes",
172 + "go_memory_classes_heap_stacks_bytes",
173 + "go_memory_classes_heap_unused_bytes",
174 + "go_memory_classes_metadata_mcache_free_bytes",
175 + "go_memory_classes_metadata_mcache_inuse_bytes",
176 + "go_memory_classes_metadata_mspan_free_bytes",
177 + "go_memory_classes_metadata_mspan_inuse_bytes",
178 + "go_memory_classes_metadata_other_bytes",
179 + "go_memory_classes_os_stacks_bytes",
180 + "go_memory_classes_other_bytes",
181 + "go_memory_classes_profiling_buckets_bytes",
182 + "go_memory_classes_total_bytes",
183 + })
184 +}
185 +
186 +func withSchedulerMetrics() []string {
187 + return withBaseMetrics([]string{
188 + "go_sched_gomaxprocs_threads",
189 + "go_sched_goroutines_goroutines",
190 + "go_sched_latencies_seconds",
191 + "go_sched_pauses_stopping_gc_seconds",
192 + "go_sched_pauses_stopping_other_seconds",
193 + "go_sched_pauses_total_gc_seconds",
194 + "go_sched_pauses_total_other_seconds",
195 + })
196 +}
197 +
198 +func withDebugMetrics() []string {
199 + return withBaseMetrics([]string{
200 + "go_godebug_non_default_behavior_allowmultiplevcs_events_total",
201 + "go_godebug_non_default_behavior_asynctimerchan_events_total",
202 + "go_godebug_non_default_behavior_containermaxprocs_events_total",
203 + "go_godebug_non_default_behavior_embedfollowsymlinks_events_total",
204 + "go_godebug_non_default_behavior_execerrdot_events_total",
205 + "go_godebug_non_default_behavior_gocachehash_events_total",
206 + "go_godebug_non_default_behavior_gocachetest_events_total",
207 + "go_godebug_non_default_behavior_gocacheverify_events_total",
208 + "go_godebug_non_default_behavior_gotestjsonbuildtext_events_total",
209 + "go_godebug_non_default_behavior_gotypesalias_events_total",
210 + "go_godebug_non_default_behavior_http2client_events_total",
211 + "go_godebug_non_default_behavior_http2server_events_total",
212 + "go_godebug_non_default_behavior_httpcookiemaxnum_events_total",
213 + "go_godebug_non_default_behavior_httplaxcontentlength_events_total",
214 + "go_godebug_non_default_behavior_httpmuxgo121_events_total",
215 + "go_godebug_non_default_behavior_httpservecontentkeepheaders_events_total",
216 + "go_godebug_non_default_behavior_installgoroot_events_total",
217 + "go_godebug_non_default_behavior_multipartmaxheaders_events_total",
218 + "go_godebug_non_default_behavior_multipartmaxparts_events_total",
219 + "go_godebug_non_default_behavior_multipathtcp_events_total",
220 + "go_godebug_non_default_behavior_netedns0_events_total",
221 + "go_godebug_non_default_behavior_panicnil_events_total",
222 + "go_godebug_non_default_behavior_randautoseed_events_total",
223 + "go_godebug_non_default_behavior_randseednop_events_total",
224 + "go_godebug_non_default_behavior_rsa1024min_events_total",
225 + "go_godebug_non_default_behavior_tarinsecurepath_events_total",
226 + "go_godebug_non_default_behavior_tls10server_events_total",
227 + "go_godebug_non_default_behavior_tls3des_events_total",
228 + "go_godebug_non_default_behavior_tlsmaxrsasize_events_total",
229 + "go_godebug_non_default_behavior_tlsrsakex_events_total",
230 + "go_godebug_non_default_behavior_tlssha1_events_total",
231 + "go_godebug_non_default_behavior_tlsunsafeekm_events_total",
232 + "go_godebug_non_default_behavior_updatemaxprocs_events_total",
233 + "go_godebug_non_default_behavior_winreadlinkvolume_events_total",
234 + "go_godebug_non_default_behavior_winsymlink_events_total",
235 + "go_godebug_non_default_behavior_x509keypairleaf_events_total",
236 + "go_godebug_non_default_behavior_x509negativeserial_events_total",
237 + "go_godebug_non_default_behavior_x509rsacrt_events_total",
238 + "go_godebug_non_default_behavior_x509sha256skid_events_total",
239 + "go_godebug_non_default_behavior_x509usefallbackroots_events_total",
240 + "go_godebug_non_default_behavior_x509usepolicies_events_total",
241 + "go_godebug_non_default_behavior_zipinsecurepath_events_total",
242 + })
243 +}
244 +
245 +var (
246 + defaultRuntimeMetrics = []string{
247 + "go_gc_gogc_percent",
248 + "go_gc_gomemlimit_bytes",
249 + "go_sched_gomaxprocs_threads",
250 + }
251 + onlyGCDefRuntimeMetrics = []string{
252 + "go_gc_gogc_percent",
253 + "go_gc_gomemlimit_bytes",
254 + }
255 + onlySchedDefRuntimeMetrics = []string{
256 + "go_sched_gomaxprocs_threads",
257 + }
258 +)
259 diff --git a/prometheus/go_collector_metrics_go125_test.go b/prometheus/go_collector_metrics_go125_test.go
260 new file mode 100644
261 index 0000000..e0276a2
262 --- /dev/null
263 +++ b/prometheus/go_collector_metrics_go125_test.go
264 @@ -0,0 +1,118 @@
265 +// Code generated by gen_go_collector_metrics_set.go; DO NOT EDIT.
266 +//go:generate go run gen_go_collector_metrics_set.go go1.25
267 +
268 +//go:build go1.25 && !go1.26
269 +// +build go1.25,!go1.26
270 +
271 +package prometheus
272 +
273 +var (
274 + expectedRuntimeMetrics = map[string]string{
275 + "/cgo/go-to-c-calls:calls": "go_cgo_go_to_c_calls_calls_total",
276 + "/cpu/classes/gc/mark/assist:cpu-seconds": "go_cpu_classes_gc_mark_assist_cpu_seconds_total",
277 + "/cpu/classes/gc/mark/dedicated:cpu-seconds": "go_cpu_classes_gc_mark_dedicated_cpu_seconds_total",
278 + "/cpu/classes/gc/mark/idle:cpu-seconds": "go_cpu_classes_gc_mark_idle_cpu_seconds_total",
279 + "/cpu/classes/gc/pause:cpu-seconds": "go_cpu_classes_gc_pause_cpu_seconds_total",
280 + "/cpu/classes/gc/total:cpu-seconds": "go_cpu_classes_gc_total_cpu_seconds_total",
281 + "/cpu/classes/idle:cpu-seconds": "go_cpu_classes_idle_cpu_seconds_total",
282 + "/cpu/classes/scavenge/assist:cpu-seconds": "go_cpu_classes_scavenge_assist_cpu_seconds_total",
283 + "/cpu/classes/scavenge/background:cpu-seconds": "go_cpu_classes_scavenge_background_cpu_seconds_total",
284 + "/cpu/classes/scavenge/total:cpu-seconds": "go_cpu_classes_scavenge_total_cpu_seconds_total",
285 + "/cpu/classes/total:cpu-seconds": "go_cpu_classes_total_cpu_seconds_total",
286 + "/cpu/classes/user:cpu-seconds": "go_cpu_classes_user_cpu_seconds_total",
287 + "/gc/cycles/automatic:gc-cycles": "go_gc_cycles_automatic_gc_cycles_total",
288 + "/gc/cycles/forced:gc-cycles": "go_gc_cycles_forced_gc_cycles_total",
289 + "/gc/cycles/total:gc-cycles": "go_gc_cycles_total_gc_cycles_total",
290 + "/gc/gogc:percent": "go_gc_gogc_percent",
291 + "/gc/gomemlimit:bytes": "go_gc_gomemlimit_bytes",
292 + "/gc/heap/allocs-by-size:bytes": "go_gc_heap_allocs_by_size_bytes",
293 + "/gc/heap/allocs:bytes": "go_gc_heap_allocs_bytes_total",
294 + "/gc/heap/allocs:objects": "go_gc_heap_allocs_objects_total",
295 + "/gc/heap/frees-by-size:bytes": "go_gc_heap_frees_by_size_bytes",
296 + "/gc/heap/frees:bytes": "go_gc_heap_frees_bytes_total",
297 + "/gc/heap/frees:objects": "go_gc_heap_frees_objects_total",
298 + "/gc/heap/goal:bytes": "go_gc_heap_goal_bytes",
299 + "/gc/heap/live:bytes": "go_gc_heap_live_bytes",
300 + "/gc/heap/objects:objects": "go_gc_heap_objects_objects",
301 + "/gc/heap/tiny/allocs:objects": "go_gc_heap_tiny_allocs_objects_total",
302 + "/gc/limiter/last-enabled:gc-cycle": "go_gc_limiter_last_enabled_gc_cycle",
303 + "/gc/pauses:seconds": "go_gc_pauses_seconds",
304 + "/gc/scan/globals:bytes": "go_gc_scan_globals_bytes",
305 + "/gc/scan/heap:bytes": "go_gc_scan_heap_bytes",
306 + "/gc/scan/stack:bytes": "go_gc_scan_stack_bytes",
307 + "/gc/scan/total:bytes": "go_gc_scan_total_bytes",
308 + "/gc/stack/starting-size:bytes": "go_gc_stack_starting_size_bytes",
309 + "/godebug/non-default-behavior/allowmultiplevcs:events": "go_godebug_non_default_behavior_allowmultiplevcs_events_total",
310 + "/godebug/non-default-behavior/asynctimerchan:events": "go_godebug_non_default_behavior_asynctimerchan_events_total",
311 + "/godebug/non-default-behavior/containermaxprocs:events": "go_godebug_non_default_behavior_containermaxprocs_events_total",
312 + "/godebug/non-default-behavior/embedfollowsymlinks:events": "go_godebug_non_default_behavior_embedfollowsymlinks_events_total",
313 + "/godebug/non-default-behavior/execerrdot:events": "go_godebug_non_default_behavior_execerrdot_events_total",
314 + "/godebug/non-default-behavior/gocachehash:events": "go_godebug_non_default_behavior_gocachehash_events_total",
315 + "/godebug/non-default-behavior/gocachetest:events": "go_godebug_non_default_behavior_gocachetest_events_total",
316 + "/godebug/non-default-behavior/gocacheverify:events": "go_godebug_non_default_behavior_gocacheverify_events_total",
317 + "/godebug/non-default-behavior/gotestjsonbuildtext:events": "go_godebug_non_default_behavior_gotestjsonbuildtext_events_total",
318 + "/godebug/non-default-behavior/gotypesalias:events": "go_godebug_non_default_behavior_gotypesalias_events_total",
319 + "/godebug/non-default-behavior/http2client:events": "go_godebug_non_default_behavior_http2client_events_total",
320 + "/godebug/non-default-behavior/http2server:events": "go_godebug_non_default_behavior_http2server_events_total",
321 + "/godebug/non-default-behavior/httpcookiemaxnum:events": "go_godebug_non_default_behavior_httpcookiemaxnum_events_total",
322 + "/godebug/non-default-behavior/httplaxcontentlength:events": "go_godebug_non_default_behavior_httplaxcontentlength_events_total",
323 + "/godebug/non-default-behavior/httpmuxgo121:events": "go_godebug_non_default_behavior_httpmuxgo121_events_total",
324 + "/godebug/non-default-behavior/httpservecontentkeepheaders:events": "go_godebug_non_default_behavior_httpservecontentkeepheaders_events_total",
325 + "/godebug/non-default-behavior/installgoroot:events": "go_godebug_non_default_behavior_installgoroot_events_total",
326 + "/godebug/non-default-behavior/multipartmaxheaders:events": "go_godebug_non_default_behavior_multipartmaxheaders_events_total",
327 + "/godebug/non-default-behavior/multipartmaxparts:events": "go_godebug_non_default_behavior_multipartmaxparts_events_total",
328 + "/godebug/non-default-behavior/multipathtcp:events": "go_godebug_non_default_behavior_multipathtcp_events_total",
329 + "/godebug/non-default-behavior/netedns0:events": "go_godebug_non_default_behavior_netedns0_events_total",
330 + "/godebug/non-default-behavior/panicnil:events": "go_godebug_non_default_behavior_panicnil_events_total",
331 + "/godebug/non-default-behavior/randautoseed:events": "go_godebug_non_default_behavior_randautoseed_events_total",
332 + "/godebug/non-default-behavior/randseednop:events": "go_godebug_non_default_behavior_randseednop_events_total",
333 + "/godebug/non-default-behavior/rsa1024min:events": "go_godebug_non_default_behavior_rsa1024min_events_total",
334 + "/godebug/non-default-behavior/tarinsecurepath:events": "go_godebug_non_default_behavior_tarinsecurepath_events_total",
335 + "/godebug/non-default-behavior/tls10server:events": "go_godebug_non_default_behavior_tls10server_events_total",
336 + "/godebug/non-default-behavior/tls3des:events": "go_godebug_non_default_behavior_tls3des_events_total",
337 + "/godebug/non-default-behavior/tlsmaxrsasize:events": "go_godebug_non_default_behavior_tlsmaxrsasize_events_total",
338 + "/godebug/non-default-behavior/tlsrsakex:events": "go_godebug_non_default_behavior_tlsrsakex_events_total",
339 + "/godebug/non-default-behavior/tlssha1:events": "go_godebug_non_default_behavior_tlssha1_events_total",
340 + "/godebug/non-default-behavior/tlsunsafeekm:events": "go_godebug_non_default_behavior_tlsunsafeekm_events_total",
341 + "/godebug/non-default-behavior/updatemaxprocs:events": "go_godebug_non_default_behavior_updatemaxprocs_events_total",
342 + "/godebug/non-default-behavior/winreadlinkvolume:events": "go_godebug_non_default_behavior_winreadlinkvolume_events_total",
343 + "/godebug/non-default-behavior/winsymlink:events": "go_godebug_non_default_behavior_winsymlink_events_total",
344 + "/godebug/non-default-behavior/x509keypairleaf:events": "go_godebug_non_default_behavior_x509keypairleaf_events_total",
345 + "/godebug/non-default-behavior/x509negativeserial:events": "go_godebug_non_default_behavior_x509negativeserial_events_total",
346 + "/godebug/non-default-behavior/x509rsacrt:events": "go_godebug_non_default_behavior_x509rsacrt_events_total",
347 + "/godebug/non-default-behavior/x509sha256skid:events": "go_godebug_non_default_behavior_x509sha256skid_events_total",
348 + "/godebug/non-default-behavior/x509usefallbackroots:events": "go_godebug_non_default_behavior_x509usefallbackroots_events_total",
349 + "/godebug/non-default-behavior/x509usepolicies:events": "go_godebug_non_default_behavior_x509usepolicies_events_total",
350 + "/godebug/non-default-behavior/zipinsecurepath:events": "go_godebug_non_default_behavior_zipinsecurepath_events_total",
351 + "/memory/classes/heap/free:bytes": "go_memory_classes_heap_free_bytes",
352 + "/memory/classes/heap/objects:bytes": "go_memory_classes_heap_objects_bytes",
353 + "/memory/classes/heap/released:bytes": "go_memory_classes_heap_released_bytes",
354 + "/memory/classes/heap/stacks:bytes": "go_memory_classes_heap_stacks_bytes",
355 + "/memory/classes/heap/unused:bytes": "go_memory_classes_heap_unused_bytes",
356 + "/memory/classes/metadata/mcache/free:bytes": "go_memory_classes_metadata_mcache_free_bytes",
357 + "/memory/classes/metadata/mcache/inuse:bytes": "go_memory_classes_metadata_mcache_inuse_bytes",
358 + "/memory/classes/metadata/mspan/free:bytes": "go_memory_classes_metadata_mspan_free_bytes",
359 + "/memory/classes/metadata/mspan/inuse:bytes": "go_memory_classes_metadata_mspan_inuse_bytes",
360 + "/memory/classes/metadata/other:bytes": "go_memory_classes_metadata_other_bytes",
361 + "/memory/classes/os-stacks:bytes": "go_memory_classes_os_stacks_bytes",
362 + "/memory/classes/other:bytes": "go_memory_classes_other_bytes",
363 + "/memory/classes/profiling/buckets:bytes": "go_memory_classes_profiling_buckets_bytes",
364 + "/memory/classes/total:bytes": "go_memory_classes_total_bytes",
365 + "/sched/gomaxprocs:threads": "go_sched_gomaxprocs_threads",
366 + "/sched/goroutines:goroutines": "go_sched_goroutines_goroutines",
367 + "/sched/latencies:seconds": "go_sched_latencies_seconds",
368 + "/sched/pauses/stopping/gc:seconds": "go_sched_pauses_stopping_gc_seconds",
369 + "/sched/pauses/stopping/other:seconds": "go_sched_pauses_stopping_other_seconds",
370 + "/sched/pauses/total/gc:seconds": "go_sched_pauses_total_gc_seconds",
371 + "/sched/pauses/total/other:seconds": "go_sched_pauses_total_other_seconds",
372 + "/sync/mutex/wait/total:seconds": "go_sync_mutex_wait_total_seconds_total",
373 + }
374 +
375 + expMetrics = map[string]string{
376 + "/gc/gogc:percent": "go_gc_gogc_percent",
377 + "/gc/gomemlimit:bytes": "go_gc_gomemlimit_bytes",
378 + "/sched/gomaxprocs:threads": "go_sched_gomaxprocs_threads",
379 + }
380 +)
381 +
382 +const expectedRuntimeMetricsCardinality = 178