From 89cae74ddd37603feecb4b5e52d61ea60a4b32be Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Fri, 3 Apr 2026 01:12:16 -0700 Subject: [PATCH] performance-metrics: Use default_kernel_cmdline helper Replace explicit --kernel and --cmdline arguments with the default_kernel_cmdline() helper in performance_net_throughput, performance_net_latency, and performance_block_io. This simplifies the code and ensures consistency with how the kernel command line is configured across tests. Signed-off-by: Muminul Islam --- performance-metrics/src/performance_tests.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/performance-metrics/src/performance_tests.rs b/performance-metrics/src/performance_tests.rs index 10c298f2d..fd90c19fb 100644 --- a/performance-metrics/src/performance_tests.rs +++ b/performance-metrics/src/performance_tests.rs @@ -147,8 +147,7 @@ pub fn performance_net_throughput(control: &PerformanceTestControl) -> f64 { let mut child = GuestCommand::new(&guest) .args(["--cpus", &format!("boot={num_queues}")]) .args(["--memory", "size=4G"]) - .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()]) - .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) + .default_kernel_cmdline() .default_disks() .args(["--net", net_params.as_str()]) .capture_output() @@ -188,8 +187,7 @@ pub fn performance_net_latency(control: &PerformanceTestControl) -> f64 { let mut child = GuestCommand::new(&guest) .args(["--cpus", &format!("boot={num_queues}")]) .args(["--memory", "size=4G"]) - .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()]) - .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) + .default_kernel_cmdline() .default_disks() .args(["--net", net_params.as_str()]) .capture_output() @@ -333,8 +331,7 @@ pub fn performance_boot_time(control: &PerformanceTestControl) -> f64 { &format!("boot={}", control.num_boot_vcpus.unwrap_or(1)), ]) .args(["--memory", "size=1G"]) - .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()]) - .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) + .default_kernel_cmdline() .args(["--console", "off"]) .default_disks(); @@ -421,8 +418,7 @@ pub fn performance_block_io(control: &PerformanceTestControl) -> f64 { let mut child = GuestCommand::new(&guest) .args(["--cpus", &format!("boot={num_queues}")]) .args(["--memory", "size=4G"]) - .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()]) - .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) + .default_kernel_cmdline() .args([ "--disk", format!( @@ -552,8 +548,7 @@ pub fn performance_restore_latency(control: &PerformanceTestControl) -> f64 { &format!("boot={}", control.num_boot_vcpus.unwrap_or(1)), ]) .args(["--memory", "size=256M"]) - .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()]) - .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) + .default_kernel_cmdline() .args(["--console", "off"]) .default_disks() .set_print_cmd(false)