Skip to content

Commit 31825b5

Browse files
committed
chore(test): Unify guest memory dimension
Only boot time perf test uses `guest_mem_mib` as a dimension while all the others use `guest_memory` via `vm.dimensions`, which makes it a pain when treating metrics data with pandas DataFrame. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent fe96ef3 commit 31825b5

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

tests/integration_tests/performance/test_boottime.py

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@
1818
)
1919

2020

21-
DIMENSIONS = {
22-
"instance": global_props.instance,
23-
"cpu_model": global_props.cpu_model,
24-
"host_os": global_props.host_os,
25-
"host_kernel": "linux-" + global_props.host_linux_version,
26-
}
27-
28-
2921
def get_boottime_device_info(vm):
3022
"""Auxiliary function for asserting the expected boot time."""
3123
boot_time_us = None
@@ -114,17 +106,7 @@ def test_boottime(
114106
):
115107
"""Test boot time with different guest configurations"""
116108

117-
metrics.set_dimensions(
118-
{
119-
**DIMENSIONS,
120-
"performance_test": "test_boottime",
121-
"guest_kernel": guest_kernel_acpi.name,
122-
"vcpus": str(vcpu_count),
123-
"mem_size_mib": str(mem_size_mib),
124-
}
125-
)
126-
127-
for _ in range(10):
109+
for i in range(10):
128110
vm = microvm_factory.build(guest_kernel_acpi, rootfs_rw)
129111
vm.jailer.extra_args.update({"boot-timer": None})
130112
vm.spawn()
@@ -139,6 +121,15 @@ def test_boottime(
139121
vm.pin_threads(0)
140122

141123
boot_time_us, cpu_boot_time_us = get_boottime_device_info(vm)
124+
125+
if i == 0:
126+
metrics.set_dimensions(
127+
{
128+
"performance_test": "test_boottime",
129+
**vm.dimensions,
130+
}
131+
)
132+
142133
metrics.put_metric(
143134
"guest_boot_time",
144135
boot_time_us,

0 commit comments

Comments
 (0)