summaryrefslogtreecommitdiff
path: root/openembedded
diff options
context:
space:
mode:
authorVincent Hsu <vincent.hsu@linaro.org>2013-09-13 15:05:53 +0800
committerFathi Boudra <fathi.boudra@linaro.org>2013-09-14 08:18:51 +0300
commitf9c4efbb832cbc34daadb03750f825db58aae886 (patch)
treea0c369ec8c761f4f425ee10b548c965c1d026aad /openembedded
parentea3b744b254b9da4fded1f4f991a99f8d01a7431 (diff)
openembedded/cyclictest: updated cyclictest
1. force to run test in cpu core 1 2. get full log and summary log at the same time 3. show more measurement resluts directly on lava webpage Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org> Acked-by: Fathi Boudra <fathi.boudra@linaro.org>
Diffstat (limited to 'openembedded')
-rw-r--r--openembedded/cyclictest.yaml8
-rwxr-xr-xopenembedded/scripts/cyclictest.py44
-rwxr-xr-xopenembedded/scripts/infinite_loop.py6
3 files changed, 43 insertions, 15 deletions
diff --git a/openembedded/cyclictest.yaml b/openembedded/cyclictest.yaml
index 6632602..9279159 100644
--- a/openembedded/cyclictest.yaml
+++ b/openembedded/cyclictest.yaml
@@ -8,9 +8,11 @@ run:
steps:
- "fping -g 127.0.0.1 127.0.0.10 -t 100 -q -l &> /dev/null &"
- "./openembedded/scripts/infinite_loop.py 864300 &> /dev/null &"
- - "cyclictest -t 50 -p 80 -n -a0 -q -D 86400 > ~/cyclictest.log"
- - "cat ~/cyclictest.log | ./openembedded/scripts/cyclictest.py"
- - "lava-test-run-attach ~/cyclictest.log text/plain"
+ - "cyclictest -t 1 -p 80 -i 10000 -n -a1 -v -D 86400 > ~/cyclictest_full.log &"
+ - "cyclictest -t 50 -p 80 -i 10000 -n -a1 -q -D 86400 > ~/cyclictest_summary.log"
+ - "cat ~/cyclictest_summary.log | ./openembedded/scripts/cyclictest.py"
+ - "lava-test-run-attach ~/cyclictest_full.log text/plain"
+ - "lava-test-run-attach ~/cyclictest_summary.log text/plain"
- "killall calibrator infinite_loop.py fping"
parse:
pattern: "^test_case_id:(?P<test_case_id>.+)\\s+result:(?P<result>\\w+)\\s+measurement:(?P<measurement>.+)\\s+units:(?P<units>.+)"
diff --git a/openembedded/scripts/cyclictest.py b/openembedded/scripts/cyclictest.py
index ba66013..aac8feb 100755
--- a/openembedded/scripts/cyclictest.py
+++ b/openembedded/scripts/cyclictest.py
@@ -3,9 +3,15 @@ import re
import sys
import os
-threshold = 10000
-pass_threshold = True
+max_threshold = 15000
+avg_threshold = 20
+min_threshold = 10
+pass_max_threshold = True
+pass_avg_threshold = True
+pass_min_threshold = True
max_lentency = 0
+avg_lentency = 0
+min_lentency = 0
#parse format:
# T:49 ( 4518) P:31 I:4243600 C: 2 Min: 8 Act: 8 Avg: 8 Max: 9
@@ -21,19 +27,35 @@ else:
for line in data:
result = parser.search(line)
if result is not None:
- if int(result.group('Max')) > threshold:
- pass_threshold = False
+ if int(result.group('Max')) > max_threshold:
+ pass_max_threshold = False
- if int(result.group('Avg')) > threshold:
- pass_threshold = False
+ if int(result.group('Avg')) > avg_threshold:
+ pass_avg_threshold = False
- if int(result.group('Min')) > threshold:
- pass_threshold = False
+ if int(result.group('Min')) > min_threshold:
+ pass_min_threshold = False
if int(result.group('Max')) > max_lentency:
max_lentency = int(result.group('Max'))
- if pass_threshold is True:
- print "test_case_id:Latency bound (<10ms) result:pass measurement:" + str(max_lentency) + " units:usecs"
+ if int(result.group('Avg')) > avg_lentency:
+ avg_lentency = int(result.group('Avg'))
+
+ if int(result.group('Min')) > min_lentency:
+ min_lentency = int(result.group('Min'))
+
+ if pass_max_threshold is True:
+ print "test_case_id:Max latency bound (<15ms) result:pass measurement:" + str(max_lentency) + " units:usecs"
+ else:
+ print "test_case_id:Max latency bound (<15ms) result:fail measurement:" + str(max_lentency) + " units:usecs"
+
+ if pass_avg_threshold is True:
+ print "test_case_id:Avg latency bound (<20ns) result:pass measurement:" + str(avg_lentency) + " units:usecs"
+ else:
+ print "test_case_id:Avg latency bound (<20ns) result:fail measurement:" + str(avg_lentency) + " units:usecs"
+
+ if pass_min_threshold is True:
+ print "test_case_id:Min latency bound (<10ns) result:pass measurement:" + str(min_lentency) + " units:usecs"
else:
- print "test_case_id:Latency bound (<10ms) result:fail measurement:" + str(max_lentency) + " units:usecs"
+ print "test_case_id:Min latency bound (<10ns) result:fail measurement:" + str(min_lentency) + " units:usecs"
diff --git a/openembedded/scripts/infinite_loop.py b/openembedded/scripts/infinite_loop.py
index 0405354..7d2ac65 100755
--- a/openembedded/scripts/infinite_loop.py
+++ b/openembedded/scripts/infinite_loop.py
@@ -3,6 +3,10 @@ import sys
import time
import os
+if len(sys.argv) != 2:
+ print "usage: infinite_loop.py <secs>"
+ sys.exit(0)
+
t1 = time.time()
while True:
@@ -11,4 +15,4 @@ while True:
if t2 > float(sys.argv[1]):
exit()
else:
- os.system("calibrator 1000 500M ca.log")
+ os.system("taskset -c 1 calibrator 1000 500M ca.log")