From 741286d2d49195934e7aefd54df09ff5c19de966 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Fri, 26 Jul 2013 14:59:19 +0530 Subject: Add iozone test definition for android. --- android/iozone.yaml | 11 ++++++++ android/scripts/iozone/iozone.sh | 40 +++++++++++++++++++++++++++++ android/scripts/iozone/iozoneparser.sh | 47 ++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 android/iozone.yaml create mode 100755 android/scripts/iozone/iozone.sh create mode 100755 android/scripts/iozone/iozoneparser.sh (limited to 'android') diff --git a/android/iozone.yaml b/android/iozone.yaml new file mode 100644 index 0000000..22ff087 --- /dev/null +++ b/android/iozone.yaml @@ -0,0 +1,11 @@ +metadata: + format: "Lava-Test Test Definition 1.0" + name: iozone + description: "iozone test for android." + +run: + steps: + - "./android/scripts/iozone/iozone.sh" + +parse: + pattern: "^(?P\\w+)\\s+(?P\\d+)\\s+(?P\\S+)\\s+(?P\\w+)$" diff --git a/android/scripts/iozone/iozone.sh b/android/scripts/iozone/iozone.sh new file mode 100755 index 0000000..287df09 --- /dev/null +++ b/android/scripts/iozone/iozone.sh @@ -0,0 +1,40 @@ +#!/system/bin/sh +# +# iozone test +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. +# +# owner: harigopal.gollamudi@linaro.org +# +############################################################################## + +# $1 is the testing location. The -b must be specified for parser. +# the file itself does not matter as it is not used. +# The -b cause results reports to be printed to stdout. + +#uncomment the following and add cross compiled iozone to this directory. +#mount -o remount,rw / +#iozone_cmd=$1"/iozone -a -i 0 -i 2 -s 16m -V teststring -b iozone_results" + +# The original command with a -b gives excel results which are printed to +# stdout and can be parsed + +iozone_cmd="iozone -a -i 0 -i 2 -s 16m -V teststring " +${iozone_cmd} &> stdout.log +sh $PWD/android/scripts/iozone/iozoneparser.sh +rm -rf stdout.log diff --git a/android/scripts/iozone/iozoneparser.sh b/android/scripts/iozone/iozoneparser.sh new file mode 100755 index 0000000..74816ff --- /dev/null +++ b/android/scripts/iozone/iozoneparser.sh @@ -0,0 +1,47 @@ +#!/system/bin/sh +# +# iozoneparser +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. +# +# owner: harigopal.gollamudi@linaro.org +# +############################################################################## + +grep -A 13 "KB reclen write rewrite" stdout.log | sed '1d' > temp.log +while read line +do + var="$(echo $line | cut -d' ' -f2)" + + Write_val="$(echo $line | cut -d' ' -f3)" + ReWrite_val="$(echo $line | cut -d' ' -f4)" + RandomRead_val="$(echo $line | cut -d' ' -f5)" + RandomWrite_val="$(echo $line | cut -d' ' -f6)" + + Write_string='iozone_Write_KB_16384_rclen'_$var' '$Write_val' 'Kbytes/sec' 'pas + RandomRead_string='iozone_Random_read_KB_16384_rclen'_$var' '$RandomRead_val' Kbytes/sec' 'pass + RandomWrite_string='iozone_Random_write_KB_16384_rclen'_$var' '$RandomWrite_va' 'Kbytes/sec' 'pass + ReWrite_string='iozone_Rewrite_KB_16384_rclen'_$var' '$ReWrite_val' 'Kbytes/se' 'pass + + echo $Write_string + echo $RandomRead_string + echo $RandomWrite_string + echo $ReWrite_string + +done < temp.log +rm -rf temp.log -- cgit v1.2.3