aboutsummaryrefslogtreecommitdiffstats
path: root/parse/ft.py
diff options
context:
space:
mode:
Diffstat (limited to 'parse/ft.py')
-rw-r--r--parse/ft.py12
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
7from point import Measurement,Type 7from point import Measurement,Type
8 8
9def get_ft_output(data_dir, out_dir): 9def 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')