diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-10-12 01:56:20 -0400 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-10-12 01:56:20 -0400 |
| commit | d66aa52d719cf7edad8cac20b711e4c16d2899de (patch) | |
| tree | 167415c66fa78c045fc0a793fe655ffba4b24cfa /parse/ft.py | |
| parent | 5d97a6baf6166b74355c6e744e010949a46fd625 (diff) | |
Bug fixes from mixed-criticality experiments
Diffstat (limited to 'parse/ft.py')
| -rw-r--r-- | parse/ft.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/parse/ft.py b/parse/ft.py index 127e49f..c915978 100644 --- a/parse/ft.py +++ b/parse/ft.py | |||
| @@ -6,7 +6,10 @@ import subprocess | |||
| 6 | 6 | ||
| 7 | from point import Measurement,Type | 7 | from point import Measurement,Type |
| 8 | 8 | ||
| 9 | def get_ft_output(data_dir, out_dir): | 9 | def get_ft_output(data_dir, out_dir, force=False): |
| 10 | """ | ||
| 11 | Create and return files containing sorted and analyzed overhead data | ||
| 12 | """ | ||
| 10 | bin_file = conf.FILES['ft_data'] + "$" | 13 | bin_file = conf.FILES['ft_data'] + "$" |
| 11 | bins = [f for f in os.listdir(data_dir) if re.match(bin_file, f)] | 14 | bins = [f for f in os.listdir(data_dir) if re.match(bin_file, f)] |
| 12 | 15 | ||
| @@ -14,8 +17,11 @@ def get_ft_output(data_dir, out_dir): | |||
| 14 | output_file = "{}/out-ft".format(out_dir) | 17 | output_file = "{}/out-ft".format(out_dir) |
| 15 | 18 | ||
| 16 | if os.path.isfile(output_file): | 19 | if os.path.isfile(output_file): |
| 17 | print("ft-output already exists for %s" % data_dir) | 20 | if force: |
| 18 | return output_file | 21 | os.remove(output_file) |
| 22 | else: | ||
| 23 | print("ft-output already exists for %s" % data_dir) | ||
| 24 | return output_file | ||
| 19 | 25 | ||
| 20 | if len(bins) != 0: | 26 | if len(bins) != 0: |
| 21 | err_file = open("%s/err-ft" % out_dir, 'w') | 27 | err_file = open("%s/err-ft" % out_dir, 'w') |
