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,9 @@
{
"alert_threshold": "125%",
"alert_tool": "customSmallerIsBetter",
"search_pattern": "TCP latency using 127.0.0.1:",
"result_index": "5",
"description": "lat_tcp_virtio",
"title": "[TCP sockets] The latency over virtio-net",
"benchmark_type": "host_guest"
}

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

View File

@ -0,0 +1,14 @@
[
{
"name": "Average TCP latency over virtio-net on Linux",
"unit": "µs",
"value": 0,
"extra": "linux_result"
},
{
"name": "Average TCP latency over virtio-net on Asterinas",
"unit": "µs",
"value": 0,
"extra": "aster_result"
}
]

View File

@ -0,0 +1,13 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
set -e
echo "Running lmbench TCP latency over virtio-net..."
# Start the server
/benchmark/bin/lmbench/lat_tcp -s 10.0.2.15
# Sleep for a long time to ensure VM won't exit
sleep 200