diff --git a/runtime/tests/meet_deadline_percentage.py b/runtime/tests/meet_deadline_percentage.py index 9e27a91..4000c4e 100644 --- a/runtime/tests/meet_deadline_percentage.py +++ b/runtime/tests/meet_deadline_percentage.py @@ -1,5 +1,11 @@ import sys +from collections import defaultdict + +def def_value(): + return 0 + def count_miss_or_meet_deadline_requests(file_dir): + request_counter = defaultdict(def_value) meet_deadline = 0 miss_deadline = 0 max_sc = 0 @@ -8,8 +14,13 @@ def count_miss_or_meet_deadline_requests(file_dir): line = line.strip() if "meet deadline" in line: meet_deadline += 1 + name = line.split(" ")[5] + request_counter[name] += 1 if "miss deadline" in line: miss_deadline += 1 + name = line.split(" ")[11] + request_counter[name] += 1 + #print("name:", name) if "scheduling count" in line: s_c = int(line.split(" ")[3]) if max_sc < s_c: @@ -21,6 +32,8 @@ def count_miss_or_meet_deadline_requests(file_dir): print("miss deadline percentage:", miss_deadline_percentage) print("scheduling counter:", max_sc) + for key,value in request_counter.items(): + print(key + ":" + str(value)) if __name__ == "__main__": argv = sys.argv[1:] if len(argv) < 1: