From 83d42d0783da40b00e85a46597b3160973da5734 Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Mon, 26 Aug 2024 17:37:30 +0800 Subject: [PATCH] Add lmbench localhost UDP latency test --- .github/workflows/benchmark_asterinas.yml | 1 + .../lmbench-udp-latency-localhost/config.json | 7 +++++++ .../result_template.json | 14 ++++++++++++++ .../benchmark/lmbench-udp-latency-localhost/run.sh | 11 +++++++++++ 4 files changed, 33 insertions(+) create mode 100644 test/benchmark/lmbench-udp-latency-localhost/config.json create mode 100644 test/benchmark/lmbench-udp-latency-localhost/result_template.json create mode 100644 test/benchmark/lmbench-udp-latency-localhost/run.sh diff --git a/.github/workflows/benchmark_asterinas.yml b/.github/workflows/benchmark_asterinas.yml index 5101beb6..4dab27dc 100644 --- a/.github/workflows/benchmark_asterinas.yml +++ b/.github/workflows/benchmark_asterinas.yml @@ -60,6 +60,7 @@ jobs: - lmbench-tcp-bandwidth-localhost - lmbench-tcp-connect-latency - lmbench-tcp-latency-localhost + - lmbench-udp-latency-localhost fail-fast: false timeout-minutes: 60 container: diff --git a/test/benchmark/lmbench-udp-latency-localhost/config.json b/test/benchmark/lmbench-udp-latency-localhost/config.json new file mode 100644 index 00000000..a9bdd7d8 --- /dev/null +++ b/test/benchmark/lmbench-udp-latency-localhost/config.json @@ -0,0 +1,7 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customSmallerIsBetter", + "search_pattern": "UDP latency using 127.0.0.1:", + "result_index": "5", + "description": "The latency of UDP on localhost." +} diff --git a/test/benchmark/lmbench-udp-latency-localhost/result_template.json b/test/benchmark/lmbench-udp-latency-localhost/result_template.json new file mode 100644 index 00000000..b4591152 --- /dev/null +++ b/test/benchmark/lmbench-udp-latency-localhost/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average UDP latency on Linux", + "unit": "µs", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average UDP latency on Asterinas", + "unit": "µs", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-udp-latency-localhost/run.sh b/test/benchmark/lmbench-udp-latency-localhost/run.sh new file mode 100644 index 00000000..77bcd13d --- /dev/null +++ b/test/benchmark/lmbench-udp-latency-localhost/run.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running lmbench UDP latency test ***" + +/benchmark/bin/lmbench/lat_udp -s +/benchmark/bin/lmbench/lat_udp -P 1 127.0.0.1 +/benchmark/bin/lmbench/lat_udp -S 127.0.0.1