diff --git a/.github/workflows/benchmark_asterinas.yml b/.github/workflows/benchmark_asterinas.yml index de9413fb5..69ab50fe7 100644 --- a/.github/workflows/benchmark_asterinas.yml +++ b/.github/workflows/benchmark_asterinas.yml @@ -46,6 +46,7 @@ jobs: # Mmap-related benchmarks - lmbench-pagefault - lmbench-mmap-bandwidth + - lmbench-mmap-latency # Semaphore benchmark - lmbench-semaphore fail-fast: false diff --git a/test/benchmark/lmbench-mmap-latency/config.json b/test/benchmark/lmbench-mmap-latency/config.json new file mode 100644 index 000000000..c3e062d22 --- /dev/null +++ b/test/benchmark/lmbench-mmap-latency/config.json @@ -0,0 +1,7 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customSmallerIsBetter", + "search_pattern": "268.435456", + "result_index": "2", + "description": "The latency of mmap on a single processor." +} diff --git a/test/benchmark/lmbench-mmap-latency/result_template.json b/test/benchmark/lmbench-mmap-latency/result_template.json new file mode 100644 index 000000000..a841e8d7f --- /dev/null +++ b/test/benchmark/lmbench-mmap-latency/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average mmap latency on Linux", + "unit": "µs", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average mmap latency on Asterinas", + "unit": "µs", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-mmap-latency/run.sh b/test/benchmark/lmbench-mmap-latency/run.sh new file mode 100644 index 000000000..35b1b7c77 --- /dev/null +++ b/test/benchmark/lmbench-mmap-latency/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench mmap latency test ***" + +dd if=/dev/zero of=/ext2/test_file bs=1M count=256 +/benchmark/bin/lmbench/lat_mmap 256m /ext2/test_file \ No newline at end of file