Skip to content

Commit 4f0af98

Browse files
committed
chore: support non-linux GOOS in e2e tests
Signed-off-by: Pranshu Srivastava <[email protected]>
1 parent 450b0b7 commit 4f0af98

File tree

4 files changed

+294
-17
lines changed

4 files changed

+294
-17
lines changed

.github/workflows/freebsd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
prepare: |
3131
pkg update -f
3232
pkg install -y bash curl git gmake go${GO_VERSION} python
33-
run: | # The steps below are executed on the FreeBSD VM.
33+
run: | # The steps below are executed inside the FreeBSD VM.
3434
set -eux
3535
mkdir golang-bin
3636
ln -s $(which go${GO_VERSION}) golang-bin/go

Makefile.common

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,13 @@ common-unused:
201201
.PHONY: common-build
202202
common-build: promu
203203
@echo ">> building binaries"
204-
$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)
204+
@$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)
205+
@# Use the codesign binary directly instead of `promu codesign` as it depends on an image that doesn't support linux/arm64 (w.r.t. darwin's rosetta emulation) yet.
206+
@if [ "$(GOHOSTOS)" == "darwin" ]; then \
207+
if command -v codesign > /dev/null 2>&1; then \
208+
codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime node_exporter ;\
209+
fi; \
210+
fi
205211

206212
.PHONY: common-tarball
207213
common-tarball: promu
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
2+
# TYPE go_gc_duration_seconds summary
3+
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent
4+
# TYPE go_gc_gogc_percent gauge
5+
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes
6+
# TYPE go_gc_gomemlimit_bytes gauge
7+
# HELP go_goroutines Number of goroutines that currently exist.
8+
# TYPE go_goroutines gauge
9+
# HELP go_info Information about the Go environment.
10+
# TYPE go_info gauge
11+
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
12+
# TYPE go_memstats_alloc_bytes gauge
13+
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
14+
# TYPE go_memstats_alloc_bytes_total counter
15+
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
16+
# TYPE go_memstats_buck_hash_sys_bytes gauge
17+
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
18+
# TYPE go_memstats_frees_total counter
19+
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
20+
# TYPE go_memstats_gc_sys_bytes gauge
21+
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
22+
# TYPE go_memstats_heap_alloc_bytes gauge
23+
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
24+
# TYPE go_memstats_heap_idle_bytes gauge
25+
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
26+
# TYPE go_memstats_heap_inuse_bytes gauge
27+
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
28+
# TYPE go_memstats_heap_objects gauge
29+
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
30+
# TYPE go_memstats_heap_released_bytes gauge
31+
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
32+
# TYPE go_memstats_heap_sys_bytes gauge
33+
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
34+
# TYPE go_memstats_last_gc_time_seconds gauge
35+
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
36+
# TYPE go_memstats_mallocs_total counter
37+
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
38+
# TYPE go_memstats_mcache_inuse_bytes gauge
39+
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
40+
# TYPE go_memstats_mcache_sys_bytes gauge
41+
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
42+
# TYPE go_memstats_mspan_inuse_bytes gauge
43+
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
44+
# TYPE go_memstats_mspan_sys_bytes gauge
45+
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
46+
# TYPE go_memstats_next_gc_bytes gauge
47+
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
48+
# TYPE go_memstats_other_sys_bytes gauge
49+
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
50+
# TYPE go_memstats_stack_inuse_bytes gauge
51+
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
52+
# TYPE go_memstats_stack_sys_bytes gauge
53+
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
54+
# TYPE go_memstats_sys_bytes gauge
55+
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads
56+
# TYPE go_sched_gomaxprocs_threads gauge
57+
# HELP go_threads Number of OS threads created.
58+
# TYPE go_threads gauge
59+
# HELP node_boot_time_seconds Unix time of last boot, including microseconds.
60+
# TYPE node_boot_time_seconds gauge
61+
node_boot_time_seconds 1.732329528488754e+09
62+
# HELP node_exec_software_interrupts_total Software interrupts since system boot. Resets at architecture unsigned integer.
63+
# TYPE node_exec_software_interrupts_total counter
64+
node_exec_software_interrupts_total 43
65+
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
66+
# TYPE node_exporter_build_info gauge
67+
# HELP node_memory_cache_bytes Almost free, backed by swap or files, available for re-allocation
68+
# TYPE node_memory_cache_bytes gauge
69+
node_memory_cache_bytes 0
70+
# HELP node_memory_size_bytes Total physical memory size
71+
# TYPE node_memory_size_bytes gauge
72+
node_memory_size_bytes 6.214455296e+09
73+
# HELP node_memory_swap_in_bytes_total Bytes paged in from swap devices
74+
# TYPE node_memory_swap_in_bytes_total counter
75+
node_memory_swap_in_bytes_total 0
76+
# HELP node_memory_swap_out_bytes_total Bytes paged out to swap devices
77+
# TYPE node_memory_swap_out_bytes_total counter
78+
node_memory_swap_out_bytes_total 0
79+
# HELP node_memory_swap_size_bytes Total swap memory size
80+
# TYPE node_memory_swap_size_bytes gauge
81+
node_memory_swap_size_bytes 1.073741824e+09
82+
# HELP node_memory_swap_used_bytes Currently allocated swap
83+
# TYPE node_memory_swap_used_bytes gauge
84+
node_memory_swap_used_bytes 0
85+
# HELP node_memory_user_wired_bytes Locked in memory by user, mlock, etc
86+
# TYPE node_memory_user_wired_bytes gauge
87+
node_memory_user_wired_bytes 0
88+
# HELP node_netisr_bindthreads netisr threads bound to CPUs
89+
# TYPE node_netisr_bindthreads gauge
90+
node_netisr_bindthreads 0
91+
# HELP node_netisr_defaultqlimit netisr default queue limit
92+
# TYPE node_netisr_defaultqlimit gauge
93+
node_netisr_defaultqlimit 256
94+
# HELP node_netisr_maxprot netisr maximum protocols
95+
# TYPE node_netisr_maxprot gauge
96+
node_netisr_maxprot 16
97+
# HELP node_netisr_maxqlimit netisr maximum queue limit
98+
# TYPE node_netisr_maxqlimit gauge
99+
node_netisr_maxqlimit 10240
100+
# HELP node_netisr_maxthreads netisr maximum thread count
101+
# TYPE node_netisr_maxthreads gauge
102+
node_netisr_maxthreads 1
103+
# HELP node_netisr_numthreads netisr current thread count
104+
# TYPE node_netisr_numthreads gauge
105+
node_netisr_numthreads 1
106+
# HELP node_network_receive_bytes_total Network device statistic receive_bytes.
107+
# TYPE node_network_receive_bytes_total counter
108+
# HELP node_network_receive_drop_total Network device statistic receive_drop.
109+
# TYPE node_network_receive_drop_total counter
110+
node_network_receive_drop_total{device="em0"} 0
111+
node_network_receive_drop_total{device="lo0"} 0
112+
# HELP node_network_receive_errs_total Network device statistic receive_errs.
113+
# TYPE node_network_receive_errs_total counter
114+
node_network_receive_errs_total{device="em0"} 0
115+
node_network_receive_errs_total{device="lo0"} 0
116+
# HELP node_network_receive_multicast_total Network device statistic receive_multicast.
117+
# TYPE node_network_receive_multicast_total counter
118+
node_network_receive_multicast_total{device="em0"} 3
119+
node_network_receive_multicast_total{device="lo0"} 0
120+
# HELP node_network_receive_packets_total Network device statistic receive_packets.
121+
# TYPE node_network_receive_packets_total counter
122+
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.
123+
# TYPE node_network_transmit_bytes_total counter
124+
# HELP node_network_transmit_drop_total Network device statistic transmit_drop.
125+
# TYPE node_network_transmit_drop_total counter
126+
node_network_transmit_drop_total{device="em0"} 0
127+
node_network_transmit_drop_total{device="lo0"} 0
128+
# HELP node_network_transmit_errs_total Network device statistic transmit_errs.
129+
# TYPE node_network_transmit_errs_total counter
130+
node_network_transmit_errs_total{device="em0"} 0
131+
node_network_transmit_errs_total{device="lo0"} 0
132+
# HELP node_network_transmit_multicast_total Network device statistic transmit_multicast.
133+
# TYPE node_network_transmit_multicast_total counter
134+
node_network_transmit_multicast_total{device="em0"} 8
135+
node_network_transmit_multicast_total{device="lo0"} 0
136+
# HELP node_network_transmit_packets_total Network device statistic transmit_packets.
137+
# TYPE node_network_transmit_packets_total counter
138+
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.
139+
# TYPE node_os_info gauge
140+
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1
141+
# HELP node_os_version Metric containing the major.minor part of the OS version.
142+
# TYPE node_os_version gauge
143+
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
144+
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
145+
# TYPE node_scrape_collector_duration_seconds gauge
146+
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
147+
# TYPE node_scrape_collector_success gauge
148+
node_scrape_collector_success{collector="boottime"} 1
149+
node_scrape_collector_success{collector="cpu"} 1
150+
node_scrape_collector_success{collector="exec"} 1
151+
node_scrape_collector_success{collector="loadavg"} 1
152+
node_scrape_collector_success{collector="meminfo"} 1
153+
node_scrape_collector_success{collector="netdev"} 1
154+
node_scrape_collector_success{collector="netisr"} 1
155+
node_scrape_collector_success{collector="os"} 1
156+
node_scrape_collector_success{collector="textfile"} 1
157+
node_scrape_collector_success{collector="time"} 1
158+
node_scrape_collector_success{collector="uname"} 1
159+
node_scrape_collector_success{collector="zfs"} 1
160+
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
161+
# TYPE node_textfile_scrape_error gauge
162+
node_textfile_scrape_error 0
163+
# HELP node_time_seconds System time in seconds since epoch (1970).
164+
# TYPE node_time_seconds gauge
165+
# HELP node_time_zone_offset_seconds System time zone offset in seconds.
166+
# TYPE node_time_zone_offset_seconds gauge
167+
# HELP node_uname_info Labeled system information as provided by the uname system call.
168+
# TYPE node_uname_info gauge
169+
node_uname_info{domainname="(none)",machine="amd64",nodename="freebsd",release="14.1-RELEASE",sysname="FreeBSD",version="FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC "} 1
170+
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
171+
# TYPE promhttp_metric_handler_errors_total counter
172+
promhttp_metric_handler_errors_total{cause="encoding"} 0
173+
promhttp_metric_handler_errors_total{cause="gathering"} 0
174+
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
175+
# TYPE promhttp_metric_handler_requests_in_flight gauge
176+
promhttp_metric_handler_requests_in_flight 1
177+
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
178+
# TYPE promhttp_metric_handler_requests_total counter
179+
promhttp_metric_handler_requests_total{code="200"} 0
180+
promhttp_metric_handler_requests_total{code="500"} 0
181+
promhttp_metric_handler_requests_total{code="503"} 0

end-to-end-test.sh

Lines changed: 105 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -euf -o pipefail
44

5+
GOHOSTOS=$(go env GOHOSTOS)
6+
57
enabled_collectors=$(cat << COLLECTORS
68
arp
79
bcache
@@ -57,13 +59,31 @@ enabled_collectors=$(cat << COLLECTORS
5759
zoneinfo
5860
COLLECTORS
5961
)
62+
63+
supported_enabled_collectors=""
64+
for collector in ${enabled_collectors}; do
65+
collector_paths=$(find ./collector -type f -name "${collector}"_"${GOHOSTOS}".go -exec basename {} _"${GOHOSTOS}".go \;)
66+
if [ -n "$collector_paths" ]; then
67+
supported_enabled_collectors="${supported_enabled_collectors} ${collector}"
68+
fi
69+
done
70+
6071
disabled_collectors=$(cat << COLLECTORS
6172
selinux
6273
filesystem
6374
timex
6475
uname
6576
COLLECTORS
6677
)
78+
79+
supported_disabled_collectors=""
80+
for collector in ${disabled_collectors}; do
81+
collector_paths=$(find ./collector -type f -name "${collector}"_"${GOHOSTOS}".go -exec basename {} _"${GOHOSTOS}".go \;)
82+
if [ -n "$collector_paths" ]; then
83+
supported_disabled_collectors="${supported_disabled_collectors} ${collector}"
84+
fi
85+
done
86+
6787
cd "$(dirname $0)"
6888

6989
port="$((10000 + (RANDOM % 10000)))"
@@ -74,8 +94,8 @@ skip_re="^(go_|node_exporter_build_info|node_scrape_collector_duration_seconds|p
7494
arch="$(uname -m)"
7595

7696
case "${arch}" in
77-
aarch64|ppc64le) fixture='collector/fixtures/e2e-64k-page-output.txt' ;;
78-
*) fixture='collector/fixtures/e2e-output.txt' ;;
97+
aarch64|ppc64le) fixture_metrics='collector/fixtures/e2e-64k-page-output.txt' ;;
98+
*) fixture_metrics='collector/fixtures/e2e-output.txt' ;;
7999
esac
80100

81101
# Only test CPU info collection on x86_64.
@@ -109,7 +129,7 @@ do
109129
*)
110130
echo "Usage: $0 [-k] [-u] [-v]"
111131
echo " -k: keep temporary files and leave node_exporter running"
112-
echo " -u: update fixture"
132+
echo " -u: update fixture_metrics"
113133
echo " -v: verbose output"
114134
exit 1
115135
;;
@@ -122,13 +142,7 @@ then
122142
exit 1
123143
fi
124144

125-
./node_exporter \
126-
--path.rootfs="collector/fixtures" \
127-
--path.procfs="collector/fixtures/proc" \
128-
--path.sysfs="collector/fixtures/sys" \
129-
--path.udev.data="collector/fixtures/udev/data" \
130-
$(for c in ${enabled_collectors}; do echo --collector.${c} ; done) \
131-
$(for c in ${disabled_collectors}; do echo --no-collector.${c} ; done) \
145+
collector_flags=$(cat << FLAGS
132146
--collector.textfile.directory="collector/fixtures/textfile/two_metric_files/" \
133147
--collector.wifi.fixtures="collector/fixtures/wifi" \
134148
--collector.qdisc.fixtures="collector/fixtures/qdisc/" \
@@ -147,12 +161,60 @@ fi
147161
--collector.sysctl.include="kernel.threads-max" \
148162
--collector.sysctl.include="fs.file-nr" \
149163
--collector.sysctl.include="fs.file-nr:total,current,max" \
150-
--collector.sysctl.include-info="kernel.seccomp.actions_avail" \
164+
--collector.sysctl.include-info="kernel.seccomp.actions_avail"
165+
FLAGS
166+
)
167+
168+
# The procedure below does three things, based on the gathered list of supported collectors (by the host) from above:
169+
# * Fetch the files that are associated with these collectors.
170+
# * Extract all flags defined within these files.
171+
# * Filter out flags (from $collector_flags) that are not supported by the supported collectors.
172+
filtered_collector_flags=""
173+
# Filter out flags that are not provided by the supported collectors.
174+
for collector in ${supported_enabled_collectors} ${supported_disabled_collectors}; do
175+
# Currently, the following file formats (OS-ARCH combinations) exist in the repository. This is used to narrow down
176+
# the search scope to the files supported by host's OS and/or ARCH.
177+
maybe_flag_search_scope="${collector}_${GOHOSTOS}.go ${collector}_${GOHOSTOS}_${arch}.go"
178+
# Check if these files exist.
179+
flag_search_scope=""
180+
for file in ${maybe_flag_search_scope}; do
181+
if [ -f "collector/${file}" ]; then
182+
flag_search_scope="${flag_search_scope} collector/${file}"
183+
fi
184+
done
185+
# Collect all flags defined within these files.
186+
supported_collector_flags=$(grep -h -E -o -- 'kingpin.Flag\("collector[.a-zA-Z0-9_\-]+' ${flag_search_scope} | sed 's/kingpin.Flag("//' | sort | uniq || true)
187+
if [ -z "${supported_collector_flags}" ]; then
188+
continue
189+
fi
190+
# Filter out flags that are not provided by the supported collectors.
191+
for flag in ${collector_flags}; do
192+
flag_name=$(echo "${flag}" | tr -d "\" " | cut -d"=" -f1 | cut -c 3-)
193+
if echo "${supported_collector_flags}" | grep -q "${flag_name}"; then
194+
filtered_collector_flags="${filtered_collector_flags} ${flag}"
195+
fi
196+
done
197+
done
198+
199+
./node_exporter \
200+
--path.rootfs="collector/fixtures" \
201+
--path.procfs="collector/fixtures/proc" \
202+
--path.sysfs="collector/fixtures/sys" \
203+
--path.udev.data="collector/fixtures/udev/data" \
204+
$(for c in ${supported_enabled_collectors}; do echo --collector.${c} ; done) \
205+
$(for c in ${supported_disabled_collectors}; do echo --no-collector.${c} ; done) \
206+
${filtered_collector_flags} \
151207
--web.listen-address "127.0.0.1:${port}" \
152208
--log.level="debug" > "${tmpdir}/node_exporter.log" 2>&1 &
153209

154210
echo $! > "${tmpdir}/node_exporter.pid"
155211

212+
generated_metrics="${tmpdir}/e2e-output.txt"
213+
if [ "${GOHOSTOS}" != "linux" ]; then
214+
generated_metrics="${tmpdir}/e2e-output-${GOHOSTOS}.txt"
215+
fixture_metrics="${fixture_metrics::-4}-${GOHOSTOS}.txt"
216+
fi
217+
156218
finish() {
157219
if [ $? -ne 0 -o ${verbose} -ne 0 ]
158220
then
@@ -165,7 +227,7 @@ EOF
165227

166228
if [ ${update} -ne 0 ]
167229
then
168-
cp "${tmpdir}/e2e-output.txt" "${fixture}"
230+
cp "${generated_metrics}" "${fixture_metrics}"
169231
fi
170232

171233
if [ ${keep} -eq 0 ]
@@ -195,8 +257,36 @@ get() {
195257

196258
sleep 1
197259

198-
get "127.0.0.1:${port}/metrics" | grep -E -v "${skip_re}" > "${tmpdir}/e2e-output.txt"
260+
get "127.0.0.1:${port}/metrics" | grep -E -v "${skip_re}" > "${generated_metrics}"
261+
262+
non_deterministic_metrics=$(cat << METRICS
263+
node_cpu_seconds_total
264+
node_exec_context_switches_total
265+
node_exec_device_interrupts_total
266+
node_exec_forks_total
267+
node_exec_system_calls_total
268+
node_exec_traps_total
269+
node_load1
270+
node_load15
271+
node_load5
272+
node_memory_active_bytes
273+
node_memory_buffer_bytes
274+
node_memory_free_bytes
275+
node_memory_inactive_bytes
276+
node_memory_laundry_bytes
277+
node_memory_wired_bytes
278+
METRICS
279+
)
280+
281+
# Remove non-deterministic metrics from the generated metrics file.
282+
for os in freebsd; do
283+
if [ "${GOHOSTOS}" = "${os}" ]; then
284+
for metric in ${non_deterministic_metrics}; do
285+
sed -i "/^${metric}/d" "${generated_metrics}"
286+
done
287+
fi
288+
done
199289

200290
diff -u \
201-
"${fixture}" \
202-
"${tmpdir}/e2e-output.txt"
291+
"${fixture_metrics}" \
292+
"${generated_metrics}"

0 commit comments

Comments
 (0)