From 45a5498c04696f2a664affaa8990243dd7f62549 Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Sat, 20 Jul 2024 21:43:20 +0800 Subject: [PATCH] Add LMbench pipe test --- test/benchmark/lmbench-pipe-bandwidth/config.json | 5 +++++ .../lmbench-pipe-bandwidth/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-pipe-bandwidth/run.sh | 9 +++++++++ test/benchmark/lmbench-pipe-latency/config.json | 5 +++++ .../lmbench-pipe-latency/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-pipe-latency/run.sh | 9 +++++++++ 6 files changed, 56 insertions(+) create mode 100644 test/benchmark/lmbench-pipe-bandwidth/config.json create mode 100644 test/benchmark/lmbench-pipe-bandwidth/result_template.json create mode 100644 test/benchmark/lmbench-pipe-bandwidth/run.sh create mode 100644 test/benchmark/lmbench-pipe-latency/config.json create mode 100644 test/benchmark/lmbench-pipe-latency/result_template.json create mode 100644 test/benchmark/lmbench-pipe-latency/run.sh diff --git a/test/benchmark/lmbench-pipe-bandwidth/config.json b/test/benchmark/lmbench-pipe-bandwidth/config.json new file mode 100644 index 000000000..145c671cb --- /dev/null +++ b/test/benchmark/lmbench-pipe-bandwidth/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "Pipe bandwidth", + "field": "3" +} diff --git a/test/benchmark/lmbench-pipe-bandwidth/result_template.json b/test/benchmark/lmbench-pipe-bandwidth/result_template.json new file mode 100644 index 000000000..69983ce3e --- /dev/null +++ b/test/benchmark/lmbench-pipe-bandwidth/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average pipe bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average pipe bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-pipe-bandwidth/run.sh b/test/benchmark/lmbench-pipe-bandwidth/run.sh new file mode 100644 index 000000000..57f7dddf6 --- /dev/null +++ b/test/benchmark/lmbench-pipe-bandwidth/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench pipe bandwidth test ***" + +/benchmark/bin/lmbench/bw_pipe -P 1 \ No newline at end of file diff --git a/test/benchmark/lmbench-pipe-latency/config.json b/test/benchmark/lmbench-pipe-latency/config.json new file mode 100644 index 000000000..03795513f --- /dev/null +++ b/test/benchmark/lmbench-pipe-latency/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "Pipe latency", + "field": "3" +} diff --git a/test/benchmark/lmbench-pipe-latency/result_template.json b/test/benchmark/lmbench-pipe-latency/result_template.json new file mode 100644 index 000000000..6d2d69d63 --- /dev/null +++ b/test/benchmark/lmbench-pipe-latency/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average pipe latency on Linux", + "unit": "ms", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average pipe latency on Asterinas", + "unit": "ms", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-pipe-latency/run.sh b/test/benchmark/lmbench-pipe-latency/run.sh new file mode 100644 index 000000000..12fe3e2e4 --- /dev/null +++ b/test/benchmark/lmbench-pipe-latency/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench pipe latency test ***" + +/benchmark/bin/lmbench/lat_pipe -P 1 \ No newline at end of file