diff --git a/conf/functional/ltp-ceprei.conf b/conf/functional/ltp-ceprei.conf new file mode 100644 index 0000000000000000000000000000000000000000..0de149a9a8d8251ab7d647c921087d699230e624 --- /dev/null +++ b/conf/functional/ltp-ceprei.conf @@ -0,0 +1,3 @@ +t +48 + diff --git a/conf/performance/fio-ceprei.conf b/conf/performance/fio-ceprei.conf new file mode 100644 index 0000000000000000000000000000000000000000..f57bc8442662ce131eed9d7566e4db043ea717ef --- /dev/null +++ b/conf/performance/fio-ceprei.conf @@ -0,0 +1,6 @@ +name ioengine time_based direct size rw bs iodepth runtime numjobs lockmem ramp_time +ceprei psync 1 1 36G read 4K 1 120 4 1G 5 +ceprei psync 1 1 36G read 1M 1 120 4 1G 5 +ceprei psync 1 1 36G write 4K 1 120 4 1G 5 +ceprei psync 1 1 36G write 1M 1 120 4 1G 5 + diff --git a/conf/performance/glmark2.conf b/conf/performance/glmark2.conf new file mode 100644 index 0000000000000000000000000000000000000000..9cca8f44e26f74cc2a12f54fe9eb49fd30cdea4d --- /dev/null +++ b/conf/performance/glmark2.conf @@ -0,0 +1,4 @@ +var +na +na +na diff --git a/conf/performance/iozone.conf b/conf/performance/iozone.conf new file mode 100644 index 0000000000000000000000000000000000000000..392d8f971131ca1e2e6cc75b40641cae8a1f42e8 --- /dev/null +++ b/conf/performance/iozone.conf @@ -0,0 +1,2 @@ +i1 i2 i3 s r +0 1 2 na 16m diff --git a/tests/fio-ceprei/Readme.md b/tests/fio-ceprei/Readme.md new file mode 100755 index 0000000000000000000000000000000000000000..3d8728f37e6e4781d9182d878ae28adb2d7f1f9e --- /dev/null +++ b/tests/fio-ceprei/Readme.md @@ -0,0 +1,52 @@ +# fio +## Description +Fio spawns a number of threads or processes doing a particular type of I/O +action as specified by the user. fio takes a number of global parameters, each +inherited by the thread unless otherwise parameters given to them overriding +that setting is given. The typical use of fio is to write a job file matching +the I/O load one wants to simulate. + +## Homepage +https://github.com/axboe/fio + +## Version +fio-3.19 + +## Category +performance + +## Parameters +- ioengine: fio 命令使用的io engine +- disk_type: disk自动监测使用测试磁盘 +- cpupin: 使用cpu亲和性设置 +- fs: 文件系统格式 +- test_sieze: 测试处理的size大小 +- rw: fio测试中read write 模式顺序读写随机读写的组合 +- bs: block size +- iodepth: iodepth设置 +- nr_task: fio运行使用的线程数目 + +## Results +``` +latency_750us: 0.01 % +latency_50us: 32.639474 % +latency_100us: 67.251473 % +latency_250us: 0.100316 % +latency_500us: 0.01 % +latency_1000us: 0.01 % +latency_10ms: 0.01 % +latency_2ms: 0.01 % +latency_4ms: 0.01 % +write_bw: 70.93359375 MBps +write_iops: 18159.229469 +write_clat_mean: 52715.313887 ns +write_clat_stddev: 10348.982437 +write_clat_90%: 59648 ns +write_clat_95%: 61184 ns +write_clat_99%: 71168 ns +workload: 5447787 +``` + +## Manual Run + +请参考官方文档 diff --git a/tests/fio-ceprei/install.sh b/tests/fio-ceprei/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..25d9ae7b01e3baf7ad31a3054ad499783ed1fdc2 --- /dev/null +++ b/tests/fio-ceprei/install.sh @@ -0,0 +1,34 @@ +. $TONE_ROOT/lib/disk.sh +GIT_URL="https://gitee.com/mirrors_axboe/fio.git" +BRANCH="fio-3.19" + +if echo "ubuntu debian uos kylin" | grep $TONE_OS_DISTRO; then + DEP_PKG_LIST="libaio1 libc6 libibverbs1 librados2 librbd1 librdmacm1 zlib1g zlib1g-dev" +else + DEP_PKG_LIST="libaio-devel clang liburing" +fi +build() +{ + # remove system version fio + if echo "ubuntu debian uos kylin" | grep $TONE_OS_DISTRO; then + dpkg -l | grep -q fio && dpkg -r fio + else + rpm -qa | grep -q fio && rpm -e fio + fi + + # build fio from source code + ./configure --prefix=$TONE_BM_RUN_DIR + make + +} + +install() +{ + make install +} + +uninstall() +{ + umount_fs +} + diff --git a/tests/fio-ceprei/parse.py b/tests/fio-ceprei/parse.py new file mode 100755 index 0000000000000000000000000000000000000000..b12274e5f577b38206393440b2c6417649c95727 --- /dev/null +++ b/tests/fio-ceprei/parse.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +import sys +import re +import json + +# Handle the input pipe +with sys.stdin as stdin: + pass + +fio_result_file = "fio-ceprei.output" +with open(fio_result_file) as fh: + data = json.load(fh) + +job_info = data['jobs'][0] + +for unit in ('us', 'ms'): + key = "latency_{}".format(unit) + for k, v in job_info[key].items(): + if v != 0: + print("latency_{}{}: {} %".format(k, unit, v)) + +allios = 0 +for op in ('read', 'write'): + ops_info = job_info[op] + if ops_info['bw'] == 0: + continue + print("{}_bw: {} MBps".format(op, ops_info['bw'] / 1024.0)) + print("{}_iops: {}".format(op, ops_info['iops'])) + if 'clat' in ops_info: + clat = ops_info['clat'] + unit = 'us' + else: + clat = ops_info['clat_ns'] + unit = 'ns' + # TODO: the unit for mean not us for clat_ns exists + print("{}_clat_mean: {} {}".format(op, clat['mean'], unit)) + print("{}_clat_stddev: {}".format(op, clat['stddev'])) + percentile = clat['percentile'] + for percent in ('90.000000', '95.000000', '99.000000'): + if percent in percentile: + if percentile[percent] != 0: + print("{}_clat_{}%: {} {}".format( + op, + int(float(percent)), + percentile[percent], + unit + )) + if 'slat' in ops_info: + slat = ops_info['slat'] + unit = 'us' + else: + slat = ops_info['slat_ns'] + unit = 'ns' + if slat['mean'] != 0: + print("{}_slat_mean: {} {}".format(op, slat['mean'], unit)) + if slat['stddev'] != 0: + print("{}_slat_stddev: {}".format(op, slat['stddev'])) + + allios += ops_info['total_ios'] +print("workload: {}".format(allios)) diff --git a/tests/fio-ceprei/run.sh b/tests/fio-ceprei/run.sh new file mode 100644 index 0000000000000000000000000000000000000000..97bd8c73ffe04112da37a62accb501355e04cdce --- /dev/null +++ b/tests/fio-ceprei/run.sh @@ -0,0 +1,27 @@ +setup() +{ + echo '' +} + +run() +{ + export PATH="$PATH:$TONE_BM_RUN_DIR/bin" + local task_output=$TONE_CURRENT_RESULT_DIR/fio-ceprei.output + task="-filename=data_file -name=${name} -ioengine=${ioengine} -time_based=${time_based} \ + -direct=${direct} -size=${size} -rw=${rw} -bs=${bs} -thread -iodepth=${iodepth} \ + -numjobs=${numjobs} -runtime=${runtime} -lockmem=${lockmem} -ramp_time=${ramp_time}" + echo testing---------- + fio $task --output-format=json --output="$task_output" + echo done------------- +} + +teardown() +{ + echo "cleaning fio data file----------" + rm -rf $TONE_BM_RUN_DIR/data_file +} + +parse() +{ + $TONE_BM_SUITE_DIR/parse.py +} diff --git a/tests/glmark2/REAME b/tests/glmark2/REAME new file mode 100644 index 0000000000000000000000000000000000000000..223e8cfc19390bc7b9f97eb93f5845e82c6c0d33 --- /dev/null +++ b/tests/glmark2/REAME @@ -0,0 +1,17 @@ +glmark2 is an OpenGL 2.0 and ES 2.0 benchmark. + +glmark2 is developed by Alexandros Frantzis and Jesse Barker based on the +original glmark benchmark by Ben Smith. + +It is licensed under the GPLv3 (see COPYING). + +To build glmark2 you need: + + * meson (>= 0.47) or python3 (if you are using WAF for building) + * libpng 1.6 + * Window system development files for the flavors you want to build + (e.g, X11, Wayland, drm) + * libGL (for desktop GL) + * libEGL and libGLESv2 (for GLESv2) + + diff --git a/tests/glmark2/install.sh b/tests/glmark2/install.sh new file mode 100644 index 0000000000000000000000000000000000000000..6c31a39f90f2b97d9dcc108c23d05c07cfa0c0a7 --- /dev/null +++ b/tests/glmark2/install.sh @@ -0,0 +1,25 @@ +GIT_URL="https://github.com/glmark2/glmark2.git" + +if echo "ubuntu debian uos kylin" | grep $TONE_OS_DISTRO; then + DEP_PKG_LIST="git g++ build-essential pkg-config libx11-dev libgl1-mesa-dev libjpeg-dev libpng-dev" +else + DEP_PKG_LIST="git automake gcc gcc-c++ kernel-devel pkg-config libX11-devel mesa-libGL-devel libjpeg-devel libpng-devel" +fi + +build() +{ + # remove system version fio + if echo "ubuntu debian uos kylin" | grep $TONE_OS_DISTRO; then + dpkg -l | grep -q glmark2 && dpkg -r glmark2 + fi + + ./waf configure --with-flavors=x11-gl + ./waf build -j 4 + +} + +install() +{ + ./waf install --destdir=$TONE_BM_RUN_DIR + strip -s /usr/local/bin/glmark2 +} diff --git a/tests/glmark2/parse.awk b/tests/glmark2/parse.awk new file mode 100755 index 0000000000000000000000000000000000000000..7bdf95131c84a9310c9e865556f6f2c431eca9dd --- /dev/null +++ b/tests/glmark2/parse.awk @@ -0,0 +1,3 @@ +#!/usr/bin/awk -f + +/glmark2 Score/{printf("glmark2_score:%.2f\n", $NF)} \ No newline at end of file diff --git a/tests/glmark2/run.sh b/tests/glmark2/run.sh new file mode 100644 index 0000000000000000000000000000000000000000..8bcd975bcdfa37f3716b01f4054d7f28efb943f1 --- /dev/null +++ b/tests/glmark2/run.sh @@ -0,0 +1,25 @@ +setup() +{ + echo '' +} + +run() +{ + export PATH="$PATH:$TONE_BM_RUN_DIR/glmark2/usr/local/bin" + export DISPLAY=:0.0 + users=(`users`) + #xhost + 必须从有显示连接的用户运行,即登陆图形化界面的用户下运行 + sudo -u ${users[0]} xhost + + glmark2 +} + +teardown() +{ + echo '' +} + +parse() +{ + echo 'parsing--------------' + $TONE_BM_SUITE_DIR/parse.awk +} \ No newline at end of file diff --git a/tests/iozone/install.sh b/tests/iozone/install.sh new file mode 100644 index 0000000000000000000000000000000000000000..dc02d58ef6be0f1167d4042fbb6000d3485768bf --- /dev/null +++ b/tests/iozone/install.sh @@ -0,0 +1,26 @@ +WEB_URL="http://www.iozone.org/src/current/iozone3_430.tar" +# BRANCH="20210927" + + +if echo "ubuntu debian uos kylin" | grep $TONE_OS_DISTRO; then + DEP_PKG_LIST="" + +else + DEP_PKG_LIST="" + +fi + + +build() +{ + tar -xvf iozone3_430.tar + cp -r iozone3_430 ..//../run/iozone/ + cd ..//../run/iozone/iozone3_430/src/current + pwd + make linux +} + +install() +{ + echo 'installed----------------' +} diff --git a/tests/iozone/parse.awk b/tests/iozone/parse.awk new file mode 100755 index 0000000000000000000000000000000000000000..133f1f7252d85774ff65463f26c42c4cfbee55a4 --- /dev/null +++ b/tests/iozone/parse.awk @@ -0,0 +1,12 @@ +#!/usr/bin/awk -f + +/kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread/{ +getline +printf("kB: %d\n",$1) +printf("reclen: %d\n",$2) +printf("write: %d\n",$3) +printf("rewrite: %d\n",$4) +printf("read: %d\n",$5) +printf("reread: %d\n\n",$6) +} + diff --git a/tests/iozone/run.sh b/tests/iozone/run.sh new file mode 100644 index 0000000000000000000000000000000000000000..58d66083011e69446a0b17b033c8f7a82ab450c6 --- /dev/null +++ b/tests/iozone/run.sh @@ -0,0 +1,57 @@ +run() +{ + + cd iozone3_430/src/current + free > data_tmp + storage=0 + for line in $(cat data_tmp) + do + case "$line" + in [1-9][0-9]*) + echo "$line is number" + storage=$line + break + ;; + *) + ;; + esac + done + a=1024 + internal=`expr $storage / $a / 1024` + + internal_storage=$(echo "scale=5; ${storage}/${a}/1024" | bc) + # echo "$internal_storage is internal_strange" + + if [ `expr $internal_storage \> $internal` -eq 1 ] + then + internal_storage=`expr $internal + 1` + fi + internal_storage1=`expr $internal_storage / 2` + + internal_storage3=`expr $internal_storage \* 2` + + internal_storage=${internal_storage}"g" + internal_storage1=${internal_storage1}"g" + internal_storage3=${internal_storage3}"g" + + echo "double_internal_storage: $internal_storage3" + ./iozone -s $internal_storage3 -i $i0 -i $i1 -i $i2 -r $r -f /tmp/testiozone + echo "internal_storage: $internal_storage1" + ./iozone -s $internal_storage -i $i0 -i $i1 -i $i2 -r $r -f /tmp/testiozone + echo "half_internal_storage1: $internal_storage3" + ./iozone -s $internal_storage1 -i $i0 -i $i1 -i $i2 -r $r -f /tmp/testiozone + cd ..//.. + +} + +teardown() +{ + rm -rf data_tmp + echo 'teardown' +} + + +parse() +{ + $TONE_BM_SUITE_DIR/parse.awk +} diff --git a/tests/ltp-ceprei/install.sh b/tests/ltp-ceprei/install.sh new file mode 100644 index 0000000000000000000000000000000000000000..df2ab25865e598b4a2fa76afc022c35a6708548f --- /dev/null +++ b/tests/ltp-ceprei/install.sh @@ -0,0 +1,25 @@ +#GIT_URL="https://gitee.com/tengent/ltp.git" +BRANCH="master" + + +if echo "ubuntu debian uos kylin" | grep $TONE_OS_DISTRO; then + DEP_PKG_LIST="pkg-config libtirpc-dev autoconf m4 genisoimage sysstat automake gcc psmisc libaio-dev unzip dosfstools keyutils net-tools bc numactl libcap-dev quota" + +else + DEP_PKG_LIST="libtirpc-devel autoconf m4 genisoimage sysstat automake gcc psmisc libaio-devel unzip dosfstools keyutils net-tools bc numactl-devel libcap-devel quota" + +fi + + +build() +{ + export CFLAGS+="-fcommon" + make autotools + ./configure --prefix="$TONE_BM_RUN_DIR" + make +} + +install() +{ + make install +} diff --git a/tests/ltp-ceprei/parse.awk b/tests/ltp-ceprei/parse.awk new file mode 100644 index 0000000000000000000000000000000000000000..ea03f87ef03e2cc9ca36510febf2aaac49c944a1 --- /dev/null +++ b/tests/ltp-ceprei/parse.awk @@ -0,0 +1,39 @@ +#!/usr/bin/awk -f + +BEGIN { + nr_pass = 0 + nr_fail = 0 + nr_skip = 0 +} + +/^tag=/ { + tc_name = substr($1,5) +} + +/termination_type=exited termination_id=0/ { + tc_ret="pass" + nr_pass++ +} + +/termination_type=exited termination_id=[1-9]+/ { + tc_ret="fail" + nr_fail++ +} + +/termination_type=exited termination_id=32/ { + tc_ret="skip" + nr_fail-- + nr_skip++ +} + +/<<>>/ { + if ( tc_ret == "pass" ) { + printf("%s: pass\n", tc_name) + } else if ( tc_ret == "fail" ) { + printf("%s: fail\n", tc_name) + } else if ( tc_ret == "skip" ) { + printf("%s: skip\n", tc_name) + } else { + printf("%s: unknown\n", tc_name) + } +} diff --git a/tests/ltp-ceprei/run.sh b/tests/ltp-ceprei/run.sh new file mode 100644 index 0000000000000000000000000000000000000000..012466799d3a117109dfc96204e07b7ca25d2991 --- /dev/null +++ b/tests/ltp-ceprei/run.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +. $TONE_ROOT/lib/testinfo.sh + +run() +{ + add_testinfo_cpu_model + ./testscripts/ltpstress.sh -n -t $t +} + +parse() +{ + k=$(pwd) + d=$(awk '/[0-9]*\.output1$/{print $0}' $k/stdout.log) + d2=$(awk '/[0-9]*\.output2$/{print $0}' $k/stdout.log) + d3=$(awk '/[0-9]*\.output3$/{print $0}' $k/stdout.log) + echo "output1\n" + awk -f $TONE_BM_SUITE_DIR/parse.awk $d + echo "output2\n" + awk -f $TONE_BM_SUITE_DIR/parse.awk $d2 + echo "output3\n" + awk -f $TONE_BM_SUITE_DIR/parse.awk $d3 +}