diff options
Diffstat (limited to 'openembedded/scripts/hackbench_parse.py')
-rwxr-xr-x | openembedded/scripts/hackbench_parse.py | 25 |
1 files changed, 25 insertions, 0 deletions
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") |