Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions tests/integration_tests/performance/test_boottime.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

import pytest

from framework.properties import global_props

# Regex for obtaining boot time from some string.

DEFAULT_BOOT_ARGS = (
Expand All @@ -18,14 +16,6 @@
)


DIMENSIONS = {
"instance": global_props.instance,
"cpu_model": global_props.cpu_model,
"host_os": global_props.host_os,
"host_kernel": "linux-" + global_props.host_linux_version,
}


def get_boottime_device_info(vm):
"""Auxiliary function for asserting the expected boot time."""
boot_time_us = None
Expand Down Expand Up @@ -114,17 +104,7 @@ def test_boottime(
):
"""Test boot time with different guest configurations"""

metrics.set_dimensions(
{
**DIMENSIONS,
"performance_test": "test_boottime",
"guest_kernel": guest_kernel_acpi.name,
"vcpus": str(vcpu_count),
"mem_size_mib": str(mem_size_mib),
}
)

for _ in range(10):
for i in range(10):
vm = microvm_factory.build(guest_kernel_acpi, rootfs_rw)
vm.jailer.extra_args.update({"boot-timer": None})
vm.spawn()
Expand All @@ -139,6 +119,15 @@ def test_boottime(
vm.pin_threads(0)

boot_time_us, cpu_boot_time_us = get_boottime_device_info(vm)

if i == 0:
metrics.set_dimensions(
{
"performance_test": "test_boottime",
**vm.dimensions,
}
)

metrics.put_metric(
"guest_boot_time",
boot_time_us,
Expand Down