mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 03:15:20 +00:00
performance-metrics: Specify queue details for latency test
The latency is the most sensitive to queue size changes. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
18d51d3bd1
commit
f254f11b48
@ -222,7 +222,11 @@ const TEST_LIST: [PerformanceTest; 15] = [
|
||||
PerformanceTest {
|
||||
name: "performance_virtio_net_latency_ns",
|
||||
func_ptr: performance_net_latency,
|
||||
control: PerformanceTestControl::default(),
|
||||
control: PerformanceTestControl {
|
||||
num_queues: Some(2),
|
||||
queue_size: Some(256),
|
||||
..PerformanceTestControl::default()
|
||||
},
|
||||
},
|
||||
PerformanceTest {
|
||||
name: "performance_virtio_net_throughput_bps_single_queue_rx_bps",
|
||||
|
@ -215,13 +215,13 @@ fn measure_virtio_net_throughput(
|
||||
|
||||
pub fn performance_net_throughput(control: &PerformanceTestControl) -> f64 {
|
||||
let test_time = control.test_timeout;
|
||||
let num_queues = control.num_queues.unwrap();
|
||||
let queue_size = control.queue_size.unwrap();
|
||||
let rx = control.net_rx.unwrap();
|
||||
|
||||
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||
let guest = performance_test_new_guest(Box::new(focal));
|
||||
|
||||
let num_queues = control.num_queues.unwrap();
|
||||
let queue_size = control.queue_size.unwrap();
|
||||
let net_params = format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,num_queues={},queue_size={}",
|
||||
guest.network.guest_mac, guest.network.host_ip, num_queues, queue_size,
|
||||
@ -347,13 +347,21 @@ fn measure_virtio_net_latency(guest: &Guest, test_time: u32) -> Result<Vec<f64>,
|
||||
pub fn performance_net_latency(control: &PerformanceTestControl) -> f64 {
|
||||
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||
let guest = performance_test_new_guest(Box::new(focal));
|
||||
|
||||
let num_queues = control.num_queues.unwrap();
|
||||
let queue_size = control.queue_size.unwrap();
|
||||
let net_params = format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,num_queues={},queue_size={}",
|
||||
guest.network.guest_mac, guest.network.host_ip, num_queues, queue_size,
|
||||
);
|
||||
|
||||
let mut child = GuestCommand::new(&guest)
|
||||
.args(&["--cpus", "boot=2"])
|
||||
.args(&["--memory", "size=4G"])
|
||||
.args(&["--kernel", direct_kernel_boot_path().to_str().unwrap()])
|
||||
.args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
|
||||
.default_disks()
|
||||
.default_net()
|
||||
.args(&["--net", net_params.as_str()])
|
||||
.capture_output()
|
||||
.set_print_cmd(false)
|
||||
.spawn()
|
||||
|
Loading…
Reference in New Issue
Block a user