diff --git a/BasicTest/performance/libMicro/README.md b/BasicTest/performance/libMicro/README.md new file mode 100644 index 0000000000000000000000000000000000000000..dd3e672c3b0b94022a16ebd7281b97642a732ce7 --- /dev/null +++ b/BasicTest/performance/libMicro/README.md @@ -0,0 +1,19 @@ +# libMicro + +衡量各自系统调用和lib库调用的性能,选择了259个常用的系统调用来评测操作系统系统调用方面的性能。 + +## 文件树 + +``` +libMicro +├── log +│   ├── LicheeRVD1.log +│   ├── NezhaD1.log +│   ├── QEMU.log +│   ├── Unmatched.log +│   ├── VisionFive1.log +│   └── VisionFive2.log +├── method.md #测试方法 +├── README.md #测试说明 +└── result.md #测试结果 +``` \ No newline at end of file diff --git a/BasicTest/performance/libMicro/method.md b/BasicTest/performance/libMicro/method.md new file mode 100644 index 0000000000000000000000000000000000000000..f770cc5be947748426e3ed933bf7fcfc32728f0a --- /dev/null +++ b/BasicTest/performance/libMicro/method.md @@ -0,0 +1,12 @@ +## 测试方法 + +执行: + +```bash +wget https://codeload.github.com/redhat-performance/libMicro/zip/0.4.1-rh +unzip 0.4.1-rh +yum install python -y +cd libMicro-0.4.1-rh +make CFLAGS=-static CC=${CROSS_COMPILE}gcc ARCH=${ARCH} -j$(nproc) +sh bench.sh +``` \ No newline at end of file diff --git a/BasicTest/performance/libMicro/result.md b/BasicTest/performance/libMicro/result.md new file mode 100644 index 0000000000000000000000000000000000000000..c9dd10aaaa5331ada437916f9106bcb875299eed --- /dev/null +++ b/BasicTest/performance/libMicro/result.md @@ -0,0 +1,56 @@ +# libMicro 测试报告 + +## 概述 + +libMicro 可用于衡量各自系统调用和 lib 库调用的性能,选择了 259 个常用的系统调用来评测操作系统系统调用方面的性能。 + +## 测试环境 + +- 发行版版本:openEuler 23.03 RISC-V Preview V1 +- 内核版本:6.1.19 +- 虚拟机版本:QEMU 8.0.4 + +## 测试方法 + +见 [method.md](./method.md) + +## 测试结果 + +测试失败。缺少适当的 Python 2 提供编译支持。 + +```text +cp wrapper.sh wrapper +make -C suites +cp multiview.sh multiview +chmod +x wrapper +chmod +x multiview +make[1]: Entering directory '/root/libMicro-0.4.1-rh/suites' +gcc -E -x c -P extended.cpp | sort -k 2 | uniq > extended.txt +gcc -E -x c -P fifo.cpp | sort -k 2 | uniq > fifo.txt +gcc -E -x c -P filesystem.cpp | sort -k 2 | uniq > filesystem.txt +gcc -E -x c -P forkexec.cpp | sort -k 2 | uniq > forkexec.txt +gcc -E -x c -P full.cpp | sort -k 2 | uniq > full.txt +gcc -E -x c -P hardware.cpp | sort -k 2 | uniq > hardware.txt +gcc -E -x c -P libc.cpp | sort -k 2 | uniq > libc.txt +gcc -E -x c -P libm.cpp | sort -k 2 | uniq > libm.txt +gcc -E -x c -P librt.cpp | sort -k 2 | uniq > librt.txt +gcc -E -x c -P localtcp.cpp | sort -k 2 | uniq > localtcp.txt +gcc -E -x c -P memcpy.cpp | sort -k 2 | uniq > memcpy.txt +gcc -E -x c -P memmove.cpp | sort -k 2 | uniq > memmove.txt +gcc -E -x c -P memory.cpp | sort -k 2 | uniq > memory.txt +gcc -E -x c -P network.cpp | sort -k 2 | uniq > network.txt +gcc -E -x c -P normal.cpp | sort -k 2 | uniq > normal.txt +gcc -E -x c -P pipe.cpp | sort -k 2 | uniq > pipe.txt +gcc -E -x c -P readwrite.cpp | sort -k 2 | uniq > readwrite.txt +gcc -E -x c -P syscalls.cpp | sort -k 2 | uniq > syscalls.txt +gcc -E -x c -P threading.cpp | sort -k 2 | uniq > threading.txt +./verify_names.py extended.txt + File "/root/libMicro-0.4.1-rh/suites/./verify_names.py", line 31 + print k, v + ^^^^^^^^^^ +SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? +make[1]: *** [Makefile:34: default] Error 1 +make[1]: Leaving directory '/root/libMicro-0.4.1-rh/suites' +make: *** [Makefile:83: suites] Error 2 +make: *** Waiting for unfinished jobs.... +``` \ No newline at end of file diff --git a/BasicTest/performance/libMicro/src/processor.py b/BasicTest/performance/libMicro/src/processor.py new file mode 100644 index 0000000000000000000000000000000000000000..cf1a35d9639438be73134673577748598a833bda --- /dev/null +++ b/BasicTest/performance/libMicro/src/processor.py @@ -0,0 +1,21 @@ +import re +import sys +import os +fin = open(sys.argv[1], encoding='UTF-8') +fout= open(os.path.splitext(os.path.split(sys.argv[1])[1])[0]+".csv",'w') +startline=re.compile(r" prc thr usecs/call samples errors cnt/samp ") +resline=re.compile(r"(\w+)\s+\d+\s+\d+\s+([\d.]+)\s+\d+\s+\d+\s+\d+") +fout.write("测试类型,测试结果\n") +line = fin.readline() +while line: + matchObj = startline.match(line) + if matchObj: + # print("success") + # fout.writelines([matchObj.group(1),",",matchObj.group(2),","]) + line = fin.readline() + matchObj = resline.match(line) + if matchObj: + fout.writelines([matchObj.group(1),",",matchObj.group(2),"\n"]) + line = fin.readline() +fin.close() +fout.close() \ No newline at end of file