diff options
-rw-r--r-- | parse/tuple_table.py | 2 | ||||
-rwxr-xr-x | parse_exps.py | 4 | ||||
-rwxr-xr-x | plot_exps.py | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/parse/tuple_table.py b/parse/tuple_table.py index ee94772..491ea7b 100644 --- a/parse/tuple_table.py +++ b/parse/tuple_table.py | |||
@@ -60,7 +60,7 @@ class ReducedTupleTable(TupleTable): | |||
60 | if not base_type in measurement: | 60 | if not base_type in measurement: |
61 | continue | 61 | continue |
62 | # Ex: release/num_tasks/measured-max/avg/x=5.csv | 62 | # Ex: release/num_tasks/measured-max/avg/x=5.csv |
63 | leaf = self.col_map.encode(kv) + ".csv" | 63 | leaf = (self.col_map.encode(kv) or "line") + ".csv" |
64 | path = [ stat, variable, base_type, summary_type, leaf ] | 64 | path = [ stat, variable, base_type, summary_type, leaf ] |
65 | result = measurement[base_type] | 65 | result = measurement[base_type] |
66 | 66 | ||
diff --git a/parse_exps.py b/parse_exps.py index ee1462c..7c75f5f 100755 --- a/parse_exps.py +++ b/parse_exps.py | |||
@@ -134,7 +134,7 @@ def main(): | |||
134 | 134 | ||
135 | sys.stderr.write("Parsing data...\n") | 135 | sys.stderr.write("Parsing data...\n") |
136 | 136 | ||
137 | procs = min(len(exps), cpu_count()/2) | 137 | procs = min(len(exps), max(cpu_count()/2, 1)) |
138 | pool = Pool(processes=procs) | 138 | pool = Pool(processes=procs) |
139 | pool_args = zip(exps, [opts.force]*len(exps)) | 139 | pool_args = zip(exps, [opts.force]*len(exps)) |
140 | enum = pool.imap_unordered(parse_exp, pool_args, 1) | 140 | enum = pool.imap_unordered(parse_exp, pool_args, 1) |
@@ -171,8 +171,8 @@ def main(): | |||
171 | 171 | ||
172 | # No csvs to write, assume user meant to print out data | 172 | # No csvs to write, assume user meant to print out data |
173 | if dir_map.is_empty(): | 173 | if dir_map.is_empty(): |
174 | sys.stderr.write("Too little data to make csv files.\n") | ||
175 | if not opts.verbose: | 174 | if not opts.verbose: |
175 | sys.stderr.write("Too little data to make csv files.\n") | ||
176 | for key, exp in result_table: | 176 | for key, exp in result_table: |
177 | for e in exp: | 177 | for e in exp: |
178 | print(e) | 178 | print(e) |
diff --git a/plot_exps.py b/plot_exps.py index 49cc729..affe231 100755 --- a/plot_exps.py +++ b/plot_exps.py | |||
@@ -142,7 +142,11 @@ def main(): | |||
142 | os.mkdir(opts.out_dir) | 142 | os.mkdir(opts.out_dir) |
143 | 143 | ||
144 | for dir in args: | 144 | for dir in args: |
145 | plot_dir(dir, opts.out_dir, opts.force) | 145 | if len(args) > 1: |
146 | out_dir = "%s/%s" % (opts.out_dir, os.path.split(dir)[1]) | ||
147 | else: | ||
148 | out_dir = opts.out_dir | ||
149 | plot_dir(dir, out_dir, opts.force) | ||
146 | 150 | ||
147 | if __name__ == '__main__': | 151 | if __name__ == '__main__': |
148 | main() | 152 | main() |