From 9fec6ce95a94aa24031e03b626b01b0880729de1 Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Mon, 26 Aug 2024 17:35:03 +0800 Subject: [PATCH] Add lmbench HTTP latency test --- .github/workflows/benchmark_asterinas.yml | 1 + test/benchmark/lmbench-http-bandwidth/config.json | 7 +++++++ .../lmbench-http-bandwidth/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-http-bandwidth/run.sh | 13 +++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 test/benchmark/lmbench-http-bandwidth/config.json create mode 100644 test/benchmark/lmbench-http-bandwidth/result_template.json create mode 100644 test/benchmark/lmbench-http-bandwidth/run.sh diff --git a/.github/workflows/benchmark_asterinas.yml b/.github/workflows/benchmark_asterinas.yml index e954d11ca..85b3c356d 100644 --- a/.github/workflows/benchmark_asterinas.yml +++ b/.github/workflows/benchmark_asterinas.yml @@ -56,6 +56,7 @@ jobs: - lmbench-semaphore # Network-related benchmark - lmbench-select-tcp + - lmbench-http-bandwidth fail-fast: false timeout-minutes: 60 container: diff --git a/test/benchmark/lmbench-http-bandwidth/config.json b/test/benchmark/lmbench-http-bandwidth/config.json new file mode 100644 index 000000000..db89db165 --- /dev/null +++ b/test/benchmark/lmbench-http-bandwidth/config.json @@ -0,0 +1,7 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customBiggerIsBetter", + "search_pattern": "Avg xfer: ", + "result_index": "8", + "description": "The bandwidth of simple HTTP transaction with 64MB file." +} diff --git a/test/benchmark/lmbench-http-bandwidth/result_template.json b/test/benchmark/lmbench-http-bandwidth/result_template.json new file mode 100644 index 000000000..701cdb3e3 --- /dev/null +++ b/test/benchmark/lmbench-http-bandwidth/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average simple HTTP transaction bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average simple HTTP transaction bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-http-bandwidth/run.sh b/test/benchmark/lmbench-http-bandwidth/run.sh new file mode 100644 index 000000000..0e94236e8 --- /dev/null +++ b/test/benchmark/lmbench-http-bandwidth/run.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running lmbench HTTP latency test ***" + +dd if=/dev/zero of=test_file bs=1M count=64 +echo "test_file" > file_list +/benchmark/bin/lmbench/lmhttp & +/benchmark/bin/lmbench/lat_http 127.0.0.1 < file_list +/benchmark/bin/lmbench/lat_http -S 127.0.0.1