performance-metrics: Add vm_type to PerformanceTestOverrides

Add an optional vm_type field to PerformanceTestOverrides to
allow overriding the VM type at runtime. Include vm_type in
the Display output for override logging.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-04-01 18:35:27 -07:00
committed by Rob Bradford
parent 55e2700fbc
commit 56a986145e
2 changed files with 6 additions and 1 deletions

View File

@@ -178,6 +178,7 @@ pub struct PerformanceTestOverrides {
test_iterations: Option<u32>,
test_timeout: Option<u32>,
test_image_format: Option<ImageFormat>,
vm_type: GuestVmType,
}
impl fmt::Display for PerformanceTestOverrides {
@@ -193,6 +194,8 @@ impl fmt::Display for PerformanceTestOverrides {
write!(f, "test_image_format = {test_image_format}")?;
}
write!(f, "vm_type = {}", self.vm_type)?;
Ok(())
}
}
@@ -1887,6 +1890,7 @@ fn main() {
.map(|s| s.parse())
.transpose()
.unwrap_or_default(),
vm_type: GuestVmType::Regular,
});
// Skip heavy VM level init/cleanup when only micro benchmarks are selected.