diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-09-29 17:38:06 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-09-29 17:38:06 -0400 |
commit | c6adbabd0bf897a1e750fe07bf068e285dd82108 (patch) | |
tree | 440b94beaa285f8c21dc1d9407e9c676a99c1a95 /parse/sched.py | |
parent | 2844e3887b4ff635dfa85e9b2ec773b06fe9af4f (diff) |
Bug fixes for mixed-criticality task systems.
Diffstat (limited to 'parse/sched.py')
-rw-r--r-- | parse/sched.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/parse/sched.py b/parse/sched.py index 94ab000..5e3ba6b 100644 --- a/parse/sched.py +++ b/parse/sched.py | |||
@@ -56,22 +56,18 @@ def extract_tardy_vals(data, exp_point): | |||
56 | max_tards = [] | 56 | max_tards = [] |
57 | 57 | ||
58 | for t in get_tasks(data): | 58 | for t in get_tasks(data): |
59 | reg = r"TARDY.*?" + t.pid + "/(\d+).*?Tot.*?([\d\.]+).*?ms.*([\d\.]+).*?ms.*?([\d\.]+)" | 59 | reg = r"TARDY.*?" + t.pid + "/(\d+).*?Tot.*?([\d\.]+).*?ms.*?([\d\.]+).*?ms.*?([\d\.]+)" |
60 | matches = re.findall(reg, data) | 60 | matches = re.findall(reg, data) |
61 | if len(matches) != 0: | 61 | if len(matches) != 0: |
62 | jobs = float(matches[0][0]) | 62 | jobs = float(matches[0][0]) |
63 | 63 | ||
64 | total_tard = float(matches[0][1]) | 64 | total_tard = float(matches[0][1]) |
65 | print("total tard: %s" % total_tard) | ||
66 | avg_tard = (total_tard / jobs) / float(t.config.period) | 65 | avg_tard = (total_tard / jobs) / float(t.config.period) |
67 | max_tard = float(matches[0][2]) / float(t.config.period) | 66 | max_tard = float(matches[0][2]) / float(t.config.period) |
68 | 67 | ||
69 | print("avg tard: %s" % avg_tard) | ||
70 | |||
71 | misses = float(matches[0][3]) | 68 | misses = float(matches[0][3]) |
72 | if misses != 0: | 69 | if misses != 0: |
73 | miss_ratio = (misses / jobs) | 70 | miss_ratio = (misses / jobs) |
74 | print("misses is %d, jobs is %d" % (misses, jobs)) | ||
75 | else: | 71 | else: |
76 | miss_ratio = 0 | 72 | miss_ratio = 0 |
77 | 73 | ||
@@ -118,6 +114,7 @@ def config_exit_stats(file): | |||
118 | 114 | ||
119 | # Dictionary of task exit measurements by pid | 115 | # Dictionary of task exit measurements by pid |
120 | exits = get_task_exits(data) | 116 | exits = get_task_exits(data) |
117 | |||
121 | exit_dict = dict((e.id, e) for e in exits) | 118 | exit_dict = dict((e.id, e) for e in exits) |
122 | 119 | ||
123 | # Dictionary where keys are configurations, values are list | 120 | # Dictionary where keys are configurations, values are list |
@@ -131,7 +128,7 @@ def config_exit_stats(file): | |||
131 | 128 | ||
132 | # Replace tasks with corresponding exit stats | 129 | # Replace tasks with corresponding exit stats |
133 | exit_list = [exit_dict[t.pid] for t in task_list] | 130 | exit_list = [exit_dict[t.pid] for t in task_list] |
134 | config_dict[config] = exit_list | 131 | config_dict[config] = exit_list |
135 | 132 | ||
136 | return config_dict | 133 | return config_dict |
137 | 134 | ||
@@ -153,6 +150,7 @@ def extract_scaling_data(data_file, base_file, result): | |||
153 | # each group | 150 | # each group |
154 | max_scales = [] | 151 | max_scales = [] |
155 | avg_scales = [] | 152 | avg_scales = [] |
153 | |||
156 | for config in data_stats: | 154 | for config in data_stats: |
157 | if len(data_stats[config]) != len(base_stats[config]): | 155 | if len(data_stats[config]) != len(base_stats[config]): |
158 | # Quit, we are missing a record and can't guarantee | 156 | # Quit, we are missing a record and can't guarantee |