From c0e572becdac63d814b460875dccb9d833d2b06d Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Wed, 11 Dec 2024 16:50:17 +0800 Subject: [PATCH] Add `ramfs_copy_files_bw` benchmark --- .github/workflows/benchmark_asterinas.yml | 1 + .../lmbench/ramfs_copy_files_bw/config.json | 8 ++++++++ .../ramfs_copy_files_bw/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench/ramfs_copy_files_bw/run.sh | 10 ++++++++++ test/benchmark/lmbench/summary.json | 1 + 5 files changed, 34 insertions(+) create mode 100644 test/benchmark/lmbench/ramfs_copy_files_bw/config.json create mode 100644 test/benchmark/lmbench/ramfs_copy_files_bw/result_template.json create mode 100644 test/benchmark/lmbench/ramfs_copy_files_bw/run.sh diff --git a/.github/workflows/benchmark_asterinas.yml b/.github/workflows/benchmark_asterinas.yml index 812688d2e..4bf6c15b8 100644 --- a/.github/workflows/benchmark_asterinas.yml +++ b/.github/workflows/benchmark_asterinas.yml @@ -51,6 +51,7 @@ jobs: # File-related benchmarks - lmbench/ramfs_create_delete_files_0k_ops - lmbench/ramfs_create_delete_files_10k_ops + - lmbench/ramfs_copy_files_bw - lmbench/ext2_create_delete_files_0k_ops - lmbench/ext2_create_delete_files_10k_ops - lmbench/ext2_copy_files_bw diff --git a/test/benchmark/lmbench/ramfs_copy_files_bw/config.json b/test/benchmark/lmbench/ramfs_copy_files_bw/config.json new file mode 100644 index 000000000..92a8fafd0 --- /dev/null +++ b/test/benchmark/lmbench/ramfs_copy_files_bw/config.json @@ -0,0 +1,8 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customBiggerIsBetter", + "search_pattern": "lmdd result:", + "result_index": "8", + "description": "lmdd", + "title": "[Ramfs] The bandwidth of copying data between files" +} \ No newline at end of file diff --git a/test/benchmark/lmbench/ramfs_copy_files_bw/result_template.json b/test/benchmark/lmbench/ramfs_copy_files_bw/result_template.json new file mode 100644 index 000000000..8c7a58c43 --- /dev/null +++ b/test/benchmark/lmbench/ramfs_copy_files_bw/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average file copy bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_result" + }, + { + "name": "Average file copy bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_result" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench/ramfs_copy_files_bw/run.sh b/test/benchmark/lmbench/ramfs_copy_files_bw/run.sh new file mode 100644 index 000000000..e2d8fc8d6 --- /dev/null +++ b/test/benchmark/lmbench/ramfs_copy_files_bw/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench lmdd test ***" + +dd if=/dev/zero of=/tmp/zero_file bs=1M count=512 +echo -n "lmdd result: " & /benchmark/bin/lmbench/lmdd if=/tmp/zero_file of=/tmp/test_file \ No newline at end of file diff --git a/test/benchmark/lmbench/summary.json b/test/benchmark/lmbench/summary.json index 0fb1fd422..f7ff26c32 100644 --- a/test/benchmark/lmbench/summary.json +++ b/test/benchmark/lmbench/summary.json @@ -24,6 +24,7 @@ "vfs_fstat_lat", "vfs_read_pagecache_bw", "vfs_select_lat", + "ramfs_copy_files_bw", "ramfs_create_delete_files_0k_ops", "ramfs_create_delete_files_10k_ops", "ext2_copy_files_bw",