summaryrefslogtreecommitdiff
path: root/openembedded
diff options
context:
space:
mode:
Diffstat (limited to 'openembedded')
-rw-r--r--openembedded/hackbench.yaml10
-rwxr-xr-xopenembedded/scripts/dd_infinite.sh4
-rwxr-xr-xopenembedded/scripts/hackbench_parse.py25
3 files changed, 35 insertions, 4 deletions
diff --git a/openembedded/hackbench.yaml b/openembedded/hackbench.yaml
index 23ce427..5dfaefc 100644
--- a/openembedded/hackbench.yaml
+++ b/openembedded/hackbench.yaml
@@ -6,9 +6,11 @@ metadata:
run:
steps:
- - while true; do dd if=/dev/zero of=bigfile bs=1024000 count=1024; done &
- - while true; do killall hackbench; sleep 5; done &
- - while true; do hackbench 20; done &
+ - ./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
+ - killall dd_infinite.sh
parse:
- pattern: "^(Time:[\\w/\\.]+):\\s+(?P<message>.+)\\.\\.\\.\\s+(?P<result>\\w+)"
+ pattern: '^(?P<test_case_id>\w+):\s+(?P<measurement>\d+(\.\d+)?)\s+(?P<units>\S+)\s+(?P<result>\w+)'
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")