From 02ad3d8cabec1ca2ca11447f727e007055b27758 Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Thu, 18 Jul 2024 15:24:28 +0800 Subject: [PATCH] Add syscall-related benchmarks --- test/benchmark/lmbench-fstat/config.json | 5 +++++ test/benchmark/lmbench-fstat/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-fstat/run.sh | 10 ++++++++++ test/benchmark/lmbench-open/config.json | 5 +++++ test/benchmark/lmbench-open/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-open/run.sh | 10 ++++++++++ test/benchmark/lmbench-stat/config.json | 5 +++++ test/benchmark/lmbench-stat/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-stat/run.sh | 10 ++++++++++ 9 files changed, 87 insertions(+) create mode 100644 test/benchmark/lmbench-fstat/config.json create mode 100644 test/benchmark/lmbench-fstat/result_template.json create mode 100644 test/benchmark/lmbench-fstat/run.sh create mode 100644 test/benchmark/lmbench-open/config.json create mode 100644 test/benchmark/lmbench-open/result_template.json create mode 100644 test/benchmark/lmbench-open/run.sh create mode 100644 test/benchmark/lmbench-stat/config.json create mode 100644 test/benchmark/lmbench-stat/result_template.json create mode 100644 test/benchmark/lmbench-stat/run.sh diff --git a/test/benchmark/lmbench-fstat/config.json b/test/benchmark/lmbench-fstat/config.json new file mode 100644 index 000000000..741bac1a9 --- /dev/null +++ b/test/benchmark/lmbench-fstat/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "Simple fstat", + "field": "3" +} diff --git a/test/benchmark/lmbench-fstat/result_template.json b/test/benchmark/lmbench-fstat/result_template.json new file mode 100644 index 000000000..8c96c4b36 --- /dev/null +++ b/test/benchmark/lmbench-fstat/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average fstat latency on Linux", + "unit": "ms", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average fstat latency on Asterinas", + "unit": "ms", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-fstat/run.sh b/test/benchmark/lmbench-fstat/run.sh new file mode 100644 index 000000000..d2e3050a3 --- /dev/null +++ b/test/benchmark/lmbench-fstat/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench fstat latency test ***" + +touch test_file +/benchmark/bin/lmbench/lat_syscall -P 1 fstat test_file \ No newline at end of file diff --git a/test/benchmark/lmbench-open/config.json b/test/benchmark/lmbench-open/config.json new file mode 100644 index 000000000..564deb4df --- /dev/null +++ b/test/benchmark/lmbench-open/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "Simple open\\/close", + "field": "3" +} diff --git a/test/benchmark/lmbench-open/result_template.json b/test/benchmark/lmbench-open/result_template.json new file mode 100644 index 000000000..d65e46f3b --- /dev/null +++ b/test/benchmark/lmbench-open/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average open latency on Linux", + "unit": "ms", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average open latency on Asterinas", + "unit": "ms", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-open/run.sh b/test/benchmark/lmbench-open/run.sh new file mode 100644 index 000000000..d309b4189 --- /dev/null +++ b/test/benchmark/lmbench-open/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench open latency test ***" + +touch test_file +/benchmark/bin/lmbench/lat_syscall -P 1 open test_file \ No newline at end of file diff --git a/test/benchmark/lmbench-stat/config.json b/test/benchmark/lmbench-stat/config.json new file mode 100644 index 000000000..e8693c7f8 --- /dev/null +++ b/test/benchmark/lmbench-stat/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "Simple stat", + "field": "3" +} diff --git a/test/benchmark/lmbench-stat/result_template.json b/test/benchmark/lmbench-stat/result_template.json new file mode 100644 index 000000000..081768524 --- /dev/null +++ b/test/benchmark/lmbench-stat/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average stat latency on Linux", + "unit": "ms", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average stat latency on Asterinas", + "unit": "ms", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-stat/run.sh b/test/benchmark/lmbench-stat/run.sh new file mode 100644 index 000000000..cccd741d0 --- /dev/null +++ b/test/benchmark/lmbench-stat/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench stat latency test ***" + +touch test_file +/benchmark/bin/lmbench/lat_syscall -P 1 stat test_file \ No newline at end of file