summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2015-08-26 22:16:34 -0700
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2015-09-02 10:53:11 +0000
commitd3d1d1de42afb31ee58781d13462d26a5b04bda9 (patch)
tree135bfc7f20e3d7a5bffb4b24e797fd0e6e721f38 /common
parent5512ed152a0bef1350183604bff9ea56839ea3ac (diff)
downloadtest-definitions-pipe-d3d1d1de42afb31ee58781d13462d26a5b04bda9.tar.gz
common: add bonnie.yaml
Bonnie++ is a benchmark suite that is aimed at performing a number of simple tests of hard drive and file system performance. Change-Id: I26a16b2edb61ff6bbf5484dad360eba2e779fc78
Diffstat (limited to 'common')
-rw-r--r--common/bonnie.yaml45
-rwxr-xr-xcommon/scripts/bonnie.sh22
2 files changed, 67 insertions, 0 deletions
diff --git a/common/bonnie.yaml b/common/bonnie.yaml
new file mode 100644
index 0000000..d5a647a
--- /dev/null
+++ b/common/bonnie.yaml
@@ -0,0 +1,45 @@
+metadata:
+ name: bonnie_benchmark_test
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Bonnie++ is a benchmark suite that is aimed at performing
+ a number of simple tests of hard drive and file system performance.
+ If a test completes in less than 500ms then the output will be displayed as '++++'.
+ This is because such a test result can't be calculated accurately due to rounding errors
+ and I would rather display no result than a wrong result."
+ maintainer:
+ - arthur.she@linaro.org
+ os:
+ - ubuntu
+ - openembedded
+ scope:
+ - performance
+ devices:
+ - arndale
+ - beaglebone-black
+ - juno
+
+install:
+ git-repos:
+ - url: https://git.linaro.org/qa/bonnie.git
+ deps:
+ - build-essential
+ steps:
+ - 'cd bonnie'
+ - './configure prefix=/usr ; make all install ; cd ..'
+
+params:
+ SCRATCH_DIR: /tmp
+ SIZE: 500
+ NUM_TO_STAT: 50
+ RAM_SIZE: 200
+
+run:
+ steps:
+ - 'OPT="-u 0:0 -d $SCRATCH_DIR -s $SIZE -n $NUM_TO_STAT -r $RAM_SIZE"'
+ - '/usr/sbin/bonnie++ $OPT | tee bonnie++.log'
+ - 'log_file_size=`du -b bonnie++.log | cut -f1`'
+ - 'if [ ${log_file_size} -gt 0 ]; then'
+ - 'lava-test-case run-bonnie++ --result pass'
+ - 'lava-test-case-attach run-bonnie++ bonnie++.log'
+ - './common/scripts/bonnie.sh bonnie++.log'
+ - 'else lava-test-case run-bonnie++ --result fail ; fi'
diff --git a/common/scripts/bonnie.sh b/common/scripts/bonnie.sh
new file mode 100755
index 0000000..7da96ac
--- /dev/null
+++ b/common/scripts/bonnie.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+LOG=$1
+TEST_ID="format_version,bonnie_version,name,concurrency,seed,file_size,io_chunk_size,putc,putc_cpu,put_block,put_block_cpu,rewrite,rewrite_cpu,getc,getc_cpu,get_block,get_block_cpu,seeks,seeks_cpu,num_files,max_size,min_size,num_dirs,file_chunk_size,seq_create,seq_create_cpu,seq_stat,seq_stat_cpu,seq_del,seq_del_cpu,ran_create,ran_create_cpu,ran_stat,ran_stat_cpu,ran_del,ran_del_cpu,putc_latency,put_block_latency,rewrite_latency,getc_latency,get_block_latency,seeks_latency,seq_create_latency,seq_stat_latency,seq_del_latency,ran_create_latency,ran_stat_latency,ran_del_latency"
+TEST_RESULT=`cat ${LOG} | grep "^[0-9]"`
+
+for i in `seq 8 48`
+do
+ unset unit
+ t=`echo ${TEST_ID}|cut -d, -f$i`
+ r=`echo ${TEST_RESULT}|cut -d, -f$i`
+ [ -z "${r}" -o "${t}" = "num_files" ] && continue
+ t_suffix=${t##*_}
+ unit=`echo ${r}|sed 's/[0-9+]*//'`
+ [ "${t_suffix}" = "cpu" ] && unit="%CPU"
+ if [ -z "${unit}" -a -z "`echo ${r} | grep -o [\+]*`" ]; then
+ [ ${i} -gt 17 ] && unit="/sec" || unit="K/sec"
+ fi
+ unset UNIT_OPT
+ [ -n "${unit}" ] && UNIT_OPT="--units ${unit}"
+ lava-test-case ${t} --result pass --measurement ${r%%[a-z]*} ${UNIT_OPT}
+done