From c2a83427520f8263a8eb2c36edacdba261ad5cae Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Fri, 16 Aug 2024 17:35:07 +0800 Subject: [PATCH] Add lmbench fifo latency test --- .github/workflows/benchmark_asterinas.yml | 1 + test/benchmark/lmbench-fifo-latency/config.json | 7 +++++++ .../lmbench-fifo-latency/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-fifo-latency/run.sh | 9 +++++++++ test/benchmark/lmbench-lmdd/config.json | 2 +- 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 test/benchmark/lmbench-fifo-latency/config.json create mode 100644 test/benchmark/lmbench-fifo-latency/result_template.json create mode 100644 test/benchmark/lmbench-fifo-latency/run.sh diff --git a/.github/workflows/benchmark_asterinas.yml b/.github/workflows/benchmark_asterinas.yml index 89846afe4..acdd3f046 100644 --- a/.github/workflows/benchmark_asterinas.yml +++ b/.github/workflows/benchmark_asterinas.yml @@ -29,6 +29,7 @@ jobs: - lmbench-unix-connect-latency - lmbench-pipe-latency - lmbench-pipe-bandwidth + - lmbench-fifo-latency # Syscall-related benchmarks - lmbench-getpid - lmbench-fstat diff --git a/test/benchmark/lmbench-fifo-latency/config.json b/test/benchmark/lmbench-fifo-latency/config.json new file mode 100644 index 000000000..66f4850e4 --- /dev/null +++ b/test/benchmark/lmbench-fifo-latency/config.json @@ -0,0 +1,7 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customSmallerIsBetter", + "search_pattern": "Fifo latency", + "result_index": "3", + "description": "The latency of fifo on a single processor." +} diff --git a/test/benchmark/lmbench-fifo-latency/result_template.json b/test/benchmark/lmbench-fifo-latency/result_template.json new file mode 100644 index 000000000..412c7a43c --- /dev/null +++ b/test/benchmark/lmbench-fifo-latency/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average fifo latency on Linux", + "unit": "µs", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average fifo latency on Asterinas", + "unit": "µs", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-fifo-latency/run.sh b/test/benchmark/lmbench-fifo-latency/run.sh new file mode 100644 index 000000000..f3cfa5c5e --- /dev/null +++ b/test/benchmark/lmbench-fifo-latency/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench fifo latency test ***" + +/benchmark/bin/lmbench/lat_fifo -P 1 \ No newline at end of file diff --git a/test/benchmark/lmbench-lmdd/config.json b/test/benchmark/lmbench-lmdd/config.json index fae4d7a38..7366926ea 100644 --- a/test/benchmark/lmbench-lmdd/config.json +++ b/test/benchmark/lmbench-lmdd/config.json @@ -2,6 +2,6 @@ "alert_threshold": "125%", "alert_tool": "customBiggerIsBetter", "search_pattern": "lmdd result:", - "result_index": "6", + "result_index": "8", "description": "The bandwidth of file copy." }