Skip to content

Commit 6b7592b

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 <itazur@amazon.com>
1 parent fe96ef3 commit 6b7592b

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

tests/integration_tests/performance/test_boottime.py

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
import pytest
1010

11-
from framework.properties import global_props
12-
1311
# Regex for obtaining boot time from some string.
1412

1513
DEFAULT_BOOT_ARGS = (
@@ -18,14 +16,6 @@
1816
)
1917

2018

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-
2919
def get_boottime_device_info(vm):
3020
"""Auxiliary function for asserting the expected boot time."""
3121
boot_time_us = None
@@ -114,17 +104,7 @@ def test_boottime(
114104
):
115105
"""Test boot time with different guest configurations"""
116106

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):
107+
for i in range(10):
128108
vm = microvm_factory.build(guest_kernel_acpi, rootfs_rw)
129109
vm.jailer.extra_args.update({"boot-timer": None})
130110
vm.spawn()
@@ -139,6 +119,15 @@ def test_boottime(
139119
vm.pin_threads(0)
140120

141121
boot_time_us, cpu_boot_time_us = get_boottime_device_info(vm)
122+
123+
if i == 0:
124+
metrics.set_dimensions(
125+
{
126+
"performance_test": "test_boottime",
127+
**vm.dimensions,
128+
}
129+
)
130+
142131
metrics.put_metric(
143132
"guest_boot_time",
144133
boot_time_us,

0 commit comments

Comments
 (0)