diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2013-10-04 16:42:36 +0200 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2013-10-24 07:18:44 +0000 |
commit | 1ef4f1dd009d980736ae901e45ae03f860109236 (patch) | |
tree | d52c137099d0f86e2d37c15c82dae2cc5af50ad3 /openembedded | |
parent | 2132db61391a194ce1ba68741b8db9a5365943c8 (diff) |
added lmbench and generalize hackbench_parse script2013.10
1. move hackbench_parse.py to common/scripts/min_max_avg_parsh.sh
and try to generalize it so lmbench can use it as well.
2. add new lmbench.yaml file to OE
Change-Id: I9ce50fb5830d2f1a6f45ca043f93da70f32041b1
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Diffstat (limited to 'openembedded')
-rw-r--r-- | openembedded/hackbench.yaml | 4 | ||||
-rw-r--r-- | openembedded/lmbench.yaml | 24 | ||||
-rwxr-xr-x | openembedded/scripts/hackbench_parse.py | 25 |
3 files changed, 26 insertions, 27 deletions
diff --git a/openembedded/hackbench.yaml b/openembedded/hackbench.yaml index 921b3a8..4a6ef1b 100644 --- a/openembedded/hackbench.yaml +++ b/openembedded/hackbench.yaml @@ -19,8 +19,8 @@ run: - ./openembedded/scripts/dd_infinite.sh &> /dev/null & - while true; do sleep 5; killall hackbench; done & - for i in {1..1001}; do hackbench | tee -a hackbench_res.txt; done - - ./openembedded/scripts/hackbench_parse.py hackbench_res.txt + - ./common/scripts/min_max_avg_parse.py hackbench_res.txt "Time:" "Seconds" - killall dd_infinite.sh parse: - pattern: '^(?P<test_case_id>\w+):\s+(?P<measurement>\d+(\.\d+)?)\s+(?P<units>\S+)\s+(?P<result>\w+)' + pattern: '^(?P<test_case_id>[^:]+):\s*(?P<measurement>[0-9.]+)\s+(?P<units>\w+)\s+(?P<result>\w+)' diff --git a/openembedded/lmbench.yaml b/openembedded/lmbench.yaml new file mode 100644 index 0000000..9590bc4 --- /dev/null +++ b/openembedded/lmbench.yaml @@ -0,0 +1,24 @@ +metadata: + name: lmbench + format: "Lava-Test-Shell Test Definition 1.0" + version: 1.0 + description: "Lmbench Suite" + maintainer: + - anders.roxell@linaro.org + + os: + - openembedded + devices: + - arndale + scope: + - performance + +run: + steps: + - './common/scripts/lmbench.sh 2>&1| tee lmbench.log' + - './common/scripts/parse_lmbench.sh lmbench.log ms result_lmbench.log' + - 'cat result_lmbench.log' + - 'lava-test-run-attach result_lmbench.log text/plain' + +parse: + pattern: '^(?P<test_case_id>[^:]+):\s*(?P<measurement>[0-9.]+)\s+(?P<units>\w+)\s+(?P<result>\w+)' diff --git a/openembedded/scripts/hackbench_parse.py b/openembedded/scripts/hackbench_parse.py deleted file mode 100755 index 9c31434..0000000 --- a/openembedded/scripts/hackbench_parse.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/python - -import re -import sys -from numpy import * - -values = [] - -r = re.compile("Time:\s(?P<measurement>\d+\.\d*)") -f = open(sys.argv[1], "r") -for line in f.readlines(): - search = r.search(line) - if search: - values.append(float(search.group('measurement'))) - -# Usually the first value is inexplicably high -values.pop(0) - -np_array = array(values) - -format = "%-16s%-16s%-16s%-16s" -print format % ("hackbench_min:", str(min(np_array)), "seconds", "pass") -print format % ("hakcbench_max:", str(max(np_array)), "seconds", "pass") -print format % ("hackbench_avg:", str(mean(np_array)), "seconds", "pass") -print format % ("hackbench_mdn:", str(median(np_array)), "seconds", "pass") |