mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
test_infra: make measure_virtio_net_throughput & co measure PPS too
While measuring UDP PPS, we saturate the link, so there are packets lost. We only account for the packets that are not lost. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -9423,7 +9423,8 @@ mod rate_limiter {
|
||||
let r = std::panic::catch_unwind(|| {
|
||||
guest.wait_vm_boot(None).unwrap();
|
||||
let measured_bps =
|
||||
measure_virtio_net_throughput(test_timeout, num_queues / 2, &guest, rx).unwrap();
|
||||
measure_virtio_net_throughput(test_timeout, num_queues / 2, &guest, rx, true)
|
||||
.unwrap();
|
||||
assert!(check_rate_limit(measured_bps, limit_bps, 0.1));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user