diff options
author | Vincent Hsu <vincent.hsu@linaro.org> | 2013-11-22 13:48:52 +0800 |
---|---|---|
committer | Vincent Hsu <vincent.hsu@linaro.org> | 2013-11-22 21:35:32 +0800 |
commit | 54fcf745421f2038b64cc1fa687c9a24e113c05c (patch) | |
tree | cfc63af77594b23e353a8d33c25703a5d43d924f /openembedded/scripts/cyclictest.py | |
parent | 751be8e82a104ad60e7fa67227cff2bc6e10a01a (diff) |
openembedded/cyclictest: get lantency bounds and running time form lava job parameters
Change-Id: Id4ba8fd7f9c234f4b4d0fc3347665354f4d9232d
Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
Diffstat (limited to 'openembedded/scripts/cyclictest.py')
-rwxr-xr-x | openembedded/scripts/cyclictest.py | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/openembedded/scripts/cyclictest.py b/openembedded/scripts/cyclictest.py index b6c7d56..63aa6d8 100755 --- a/openembedded/scripts/cyclictest.py +++ b/openembedded/scripts/cyclictest.py @@ -3,18 +3,15 @@ import re import sys import os -# threshold values, in us -max_threshold = 15000 -avg_threshold = 20 -min_threshold = 10 +max_threshold = int(sys.argv[1]) +avg_threshold = int(sys.argv[2]) pass_max_threshold = True pass_avg_threshold = True -pass_min_threshold = True max_lentency = 0 avg_lentency = 0 min_lentency = 0 -#parse format: +# parse format: # T:49 ( 4518) P:31 I:4243600 C: 2 Min: 8 Act: 8 Avg: 8 Max: 9 parser = re.compile("(?P<T>\d+)\D+(?P<T1>\d+)\D+(?P<P>\d+)\D+(?P<I>\d+)\D+(?P<C>\d+)\D+(?P<Min>\d+)\D+(?P<Act>\d+)\D+(?P<Avg>\d+)\D+(?P<Max>\d+)") @@ -32,9 +29,6 @@ else: if int(result.group('Avg')) > avg_threshold: pass_avg_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')) @@ -45,16 +39,14 @@ else: min_lentency = int(result.group('Min')) if pass_max_threshold is True: - print "test_case_id:Max latency bound (<15000us) result:pass measurement:" + str(max_lentency) + " units:usecs" + print "test_case_id:Max latency bound (<" + str(max_threshold) + "us) result:pass measurement:" + str(max_lentency) + " units:usecs" else: - print "test_case_id:Max latency bound (<15000us) result:fail measurement:" + str(max_lentency) + " units:usecs" + print "test_case_id:Max latency bound (<" + str(max_threshold) + "us) result:fail measurement:" + str(max_lentency) + " units:usecs" if pass_avg_threshold is True: - print "test_case_id:Avg latency bound (<20us) result:pass measurement:" + str(avg_lentency) + " units:usecs" + print "test_case_id:Avg latency bound (<" + str(avg_threshold) + "us) result:pass measurement:" + str(avg_lentency) + " units:usecs" else: - print "test_case_id:Avg latency bound (<20us) result:fail measurement:" + str(avg_lentency) + " units:usecs" + print "test_case_id:Avg latency bound (<" + str(avg_threshold) + "us) result:fail measurement:" + str(avg_lentency) + " units:usecs" - if pass_min_threshold is True: - print "test_case_id:Min latency bound (<10us) result:pass measurement:" + str(min_lentency) + " units:usecs" - else: - print "test_case_id:Min latency bound (<10us) result:fail measurement:" + str(min_lentency) + " units:usecs" + # ignore min latency bound + print "test_case_id:Min latency result:skip measurement:" + str(min_lentency) + " units:usecs" |