diff options
author | Ciprian Barbu <ciprian.barbu@linaro.org> | 2013-09-06 18:07:16 +0300 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2013-09-06 20:25:11 +0300 |
commit | 18563b72f63b98dcd41473b1e25c2cf4f5abe488 (patch) | |
tree | 959fdab5be9cb10ab769f2b05a22db081d6ebeaf /openembedded/scripts | |
parent | 99a752a95ed9870ecda40f6550c12952d3963f98 (diff) |
hackbench: update measurements
modified the hackbench test suite to run a fixed number of iterations
and added a script called dd_infinite.sh that does the dd part. This is
useful for having relevant measurements, since in idle the performance is
usually good. The results are gathered by hackbench_parse.py which outputs
4 measurements, minimum value, maximum, average and median.
tested on validation.linaro.org, results can be found at
http://validation.linaro.org/scheduler/job/71437
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
Acked-by: Fathi Boudra <fathi.boudra@linaro.org>
Diffstat (limited to 'openembedded/scripts')
-rwxr-xr-x | openembedded/scripts/dd_infinite.sh | 4 | ||||
-rwxr-xr-x | openembedded/scripts/hackbench_parse.py | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/openembedded/scripts/dd_infinite.sh b/openembedded/scripts/dd_infinite.sh new file mode 100755 index 0000000..5b26f1b --- /dev/null +++ b/openembedded/scripts/dd_infinite.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +while true; do dd if=/dev/zero of=bigfile bs=1024000 count=1024; done + diff --git a/openembedded/scripts/hackbench_parse.py b/openembedded/scripts/hackbench_parse.py new file mode 100755 index 0000000..9c31434 --- /dev/null +++ b/openembedded/scripts/hackbench_parse.py @@ -0,0 +1,25 @@ +#!/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") |