From e22d23429e3cb7aaea1d1e6503a8cb5104b985f9 Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Thu, 18 Jul 2024 15:27:45 +0800 Subject: [PATCH] Add unix latency benchmark --- test/benchmark/lmbench-unix-latency/config.json | 5 +++++ .../lmbench-unix-latency/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-unix-latency/run.sh | 9 +++++++++ 3 files changed, 28 insertions(+) create mode 100644 test/benchmark/lmbench-unix-latency/config.json create mode 100644 test/benchmark/lmbench-unix-latency/result_template.json create mode 100644 test/benchmark/lmbench-unix-latency/run.sh diff --git a/test/benchmark/lmbench-unix-latency/config.json b/test/benchmark/lmbench-unix-latency/config.json new file mode 100644 index 000000000..5f0821379 --- /dev/null +++ b/test/benchmark/lmbench-unix-latency/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "sock stream latency", + "field": "5" +} \ No newline at end of file diff --git a/test/benchmark/lmbench-unix-latency/result_template.json b/test/benchmark/lmbench-unix-latency/result_template.json new file mode 100644 index 000000000..ec18109a0 --- /dev/null +++ b/test/benchmark/lmbench-unix-latency/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average unix latency on Linux", + "unit": "ms", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average unix latency on Asterinas", + "unit": "ms", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-unix-latency/run.sh b/test/benchmark/lmbench-unix-latency/run.sh new file mode 100644 index 000000000..8c77f2993 --- /dev/null +++ b/test/benchmark/lmbench-unix-latency/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench unix latency test ***" + +/benchmark/bin/lmbench/lat_unix -P 1 \ No newline at end of file