Skip to content

Commit 0c8af7b

Browse files
test(lmbench): 添加进程间通信 (IPC) 性能测试脚本
添加 IPC 机制的性能测试脚本: 管道测试: - pipe_bw.sh: 管道带宽测试 - pipe_lat.sh: 管道延迟测试 FIFO 测试: - fifo_lat.sh: FIFO 延迟测试 信号量测试: - semaphore_lat.sh: 信号量操作延迟测试 这些测试用于评估不同 IPC 机制的性能特征。 Signed-off-by: yuming <mingjiangyu1@qq.com>
1 parent 5eb383b commit 0c8af7b

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: fifo_lat
3+
# Binary: lat_fifo
4+
# Description: FIFO latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running fifo_lat test ==="
14+
${LMBENCH_BIN}/lat_fifo -P 1
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: pipe_bw
3+
# Binary: bw_pipe
4+
# Description: Pipe bandwidth test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running pipe_bw test ==="
14+
${LMBENCH_BIN}/bw_pipe -P 1
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: pipe_lat
3+
# Binary: lat_pipe
4+
# Description: Pipe latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running pipe_lat test ==="
14+
${LMBENCH_BIN}/lat_pipe -P 1
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: semaphore_lat
3+
# Binary: lat_sem
4+
# Description: Semaphore latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running semaphore_lat test ==="
14+
${LMBENCH_BIN}/lat_sem -P 1 -N 21
15+
16+
echo "Test completed successfully"

0 commit comments

Comments
 (0)