summaryrefslogtreecommitdiff
path: root/openembedded/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'openembedded/scripts')
-rwxr-xr-xopenembedded/scripts/cyclictest.py44
-rwxr-xr-xopenembedded/scripts/infinite_loop.py6
2 files changed, 38 insertions, 12 deletions
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")