diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-10-07 23:40:12 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-10-07 23:40:12 -0400 |
commit | 5d97a6baf6166b74355c6e744e010949a46fd625 (patch) | |
tree | 9a0ac19bd5cb0b5a366fc2e7a9c814a7ab520a18 /parse_exps.py | |
parent | c8cb14963511d5d1a3eb46624bcc0d2bcdf3b9bc (diff) |
Split scheduling data by task criticality.
Diffstat (limited to 'parse_exps.py')
-rwxr-xr-x | parse_exps.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/parse_exps.py b/parse_exps.py index c91a654..8f98309 100755 --- a/parse_exps.py +++ b/parse_exps.py | |||
@@ -42,18 +42,18 @@ def get_exp_params(data_dir, col_map): | |||
42 | # Track all changed params | 42 | # Track all changed params |
43 | for key in params.keys(): | 43 | for key in params.keys(): |
44 | col_map.try_add(key) | 44 | col_map.try_add(key) |
45 | 45 | ||
46 | return params | 46 | return params |
47 | 47 | ||
48 | 48 | ||
49 | def gen_exp_data(exp_dirs, base_conf, col_map): | 49 | def gen_exp_data(exp_dirs, base_conf, col_map): |
50 | plain_exps = [] | 50 | plain_exps = [] |
51 | scaling_bases = [] | 51 | scaling_bases = [] |
52 | 52 | ||
53 | for data_dir in exp_dirs: | 53 | for data_dir in exp_dirs: |
54 | if not os.path.isdir(data_dir): | 54 | if not os.path.isdir(data_dir): |
55 | raise IOError("Invalid experiment '%s'" % os.path.abspath(data_dir)) | 55 | raise IOError("Invalid experiment '%s'" % os.path.abspath(data_dir)) |
56 | 56 | ||
57 | tmp_dir = data_dir + "/tmp" | 57 | tmp_dir = data_dir + "/tmp" |
58 | if not os.path.exists(tmp_dir): | 58 | if not os.path.exists(tmp_dir): |
59 | os.mkdir(tmp_dir) | 59 | os.mkdir(tmp_dir) |
@@ -85,7 +85,7 @@ def main(): | |||
85 | # Configuration key for task systems used to calculate task | 85 | # Configuration key for task systems used to calculate task |
86 | # execution scaling factors | 86 | # execution scaling factors |
87 | base_conf = dict(re.findall("(.*)=(.*)", opts.scale_against)) | 87 | base_conf = dict(re.findall("(.*)=(.*)", opts.scale_against)) |
88 | 88 | ||
89 | col_map = ColMap() | 89 | col_map = ColMap() |
90 | 90 | ||
91 | (plain_exps, scaling_bases) = gen_exp_data(args, base_conf, col_map) | 91 | (plain_exps, scaling_bases) = gen_exp_data(args, base_conf, col_map) |
@@ -103,7 +103,7 @@ def main(): | |||
103 | 103 | ||
104 | for exp in plain_exps: | 104 | for exp in plain_exps: |
105 | result = ExpPoint(exp.name) | 105 | result = ExpPoint(exp.name) |
106 | 106 | ||
107 | if exp.data_files.ft: | 107 | if exp.data_files.ft: |
108 | # Write overheads into result | 108 | # Write overheads into result |
109 | ft.extract_ft_data(exp.data_files.ft, result, conf.BASE_EVENTS) | 109 | ft.extract_ft_data(exp.data_files.ft, result, conf.BASE_EVENTS) |
@@ -115,13 +115,9 @@ def main(): | |||
115 | base_params = copy.deepcopy(exp.params) | 115 | base_params = copy.deepcopy(exp.params) |
116 | base_params.pop(base_conf.keys()[0]) | 116 | base_params.pop(base_conf.keys()[0]) |
117 | base = base_table.get_exps(base_params)[0] | 117 | base = base_table.get_exps(base_params)[0] |
118 | if base: | ||
119 | # Write scaling factor (vs base) into result | ||
120 | st.extract_scaling_data(exp.data_files.st, | ||
121 | base.data_files.st, | ||
122 | result) | ||
123 | # Write deadline misses / tardiness into result | 118 | # Write deadline misses / tardiness into result |
124 | st.extract_sched_data(exp.data_files.st, result) | 119 | st.extract_sched_data(exp.data_files.st, result, |
120 | base.data_files.st if base else None) | ||
125 | 121 | ||
126 | result_table.add_exp(exp.params, result) | 122 | result_table.add_exp(exp.params, result) |
127 | 123 | ||
@@ -129,6 +125,6 @@ def main(): | |||
129 | 125 | ||
130 | 126 | ||
131 | result_table.write_result(opts.out_dir) | 127 | result_table.write_result(opts.out_dir) |
132 | 128 | ||
133 | if __name__ == '__main__': | 129 | if __name__ == '__main__': |
134 | main() | 130 | main() |