Add tcp latency test over virtio-net

This commit is contained in:
jiangjianfeng
2024-10-12 02:09:58 +00:00
committed by Tate, Hongliang Tian
parent e78303b01a
commit 090149eed7
14 changed files with 102 additions and 9 deletions

View File

@ -0,0 +1,21 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
set -e
# Function to stop the guest VM
stop_guest() {
echo "Stopping guest VM..."
# `-r` means if there's no qemu, the kill won't be executed
pgrep qemu | xargs -r kill
}
# Trap EXIT signal to ensure guest VM is stopped on script exit
trap stop_guest EXIT
# Run lmbench tcp client
echo "Running lmbench tcp client"
/usr/local/benchmark/lmbench/lat_tcp -P 1 127.0.0.1
# The trap will automatically stop the guest VM when the script exits