diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2013-11-22 11:16:59 +0100 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2013-12-03 19:04:01 +0000 |
commit | d771232f36ad0a10b3c23157e9e2d3a7b1006755 (patch) | |
tree | 77bbac21e1d5db565986818799d19ae0ea67ce54 /openembedded/scripts | |
parent | 916820b68769b13ae88c11b8e204d68c95e932a6 (diff) |
OE/scripts/cyclictest.py: cleanup and min compare bug
and cleanup spelling error that Vincent Hsu pointed out.
Change-Id: I6134db6f1774c197cb92e09c89faf9782edb7fd2
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Vincent Hsu <vincent.hsu@linaro.org>
Diffstat (limited to 'openembedded/scripts')
-rwxr-xr-x | openembedded/scripts/cyclictest.py | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/openembedded/scripts/cyclictest.py b/openembedded/scripts/cyclictest.py index 63aa6d8..016f093 100755 --- a/openembedded/scripts/cyclictest.py +++ b/openembedded/scripts/cyclictest.py @@ -5,11 +5,11 @@ import os max_threshold = int(sys.argv[1]) avg_threshold = int(sys.argv[2]) -pass_max_threshold = True -pass_avg_threshold = True -max_lentency = 0 -avg_lentency = 0 -min_lentency = 0 +pass_max_threshold = "pass" +pass_avg_threshold = "pass" +max_latency = 0 +avg_latency = 0 +min_latency = max_threshold # parse format: # T:49 ( 4518) P:31 I:4243600 C: 2 Min: 8 Act: 8 Avg: 8 Max: 9 @@ -24,29 +24,23 @@ else: result = parser.search(line) if result is not None: if int(result.group('Max')) > max_threshold: - pass_max_threshold = False + pass_max_threshold = "fail" if int(result.group('Avg')) > avg_threshold: - pass_avg_threshold = False + pass_avg_threshold = "fail" - if int(result.group('Max')) > max_lentency: - max_lentency = int(result.group('Max')) + if int(result.group('Max')) > max_latency: + max_latency = int(result.group('Max')) - if int(result.group('Avg')) > avg_lentency: - avg_lentency = int(result.group('Avg')) + if int(result.group('Avg')) > avg_latency: + avg_latency = int(result.group('Avg')) - if int(result.group('Min')) > min_lentency: - min_lentency = int(result.group('Min')) + if int(result.group('Min')) < min_latency: + min_latency = int(result.group('Min')) - if pass_max_threshold is True: - 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 (<" + str(max_threshold) + "us) result:fail measurement:" + str(max_lentency) + " units:usecs" + print "test_case_id:Max latency bound (<" + str(max_threshold) + "us) result:" + pass_max_threshold + " measurement:" + str(max_latency) + " units:usecs" - if pass_avg_threshold is True: - 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 (<" + str(avg_threshold) + "us) result:fail measurement:" + str(avg_lentency) + " units:usecs" + print "test_case_id:Avg latency bound (<" + str(avg_threshold) + "us) result:" + pass_avg_threshold + " measurement:" + str(avg_latency) + " units:usecs" # ignore min latency bound - print "test_case_id:Min latency result:skip measurement:" + str(min_lentency) + " units:usecs" + print "test_case_id:Min latency result:skip measurement:" + str(min_latency) + " units:usecs" |