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 <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-04-03 01:12:16 -07:00
committed by Rob Bradford
parent 3440802c99
commit 89cae74ddd

View File

@@ -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)