diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-11-19 14:53:04 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-11-19 14:53:04 -0500 |
| commit | ad684697958471077d325ae144a48ad49acd7716 (patch) | |
| tree | abb7426e3f4e12417e5baca56aac4e94408c1bf0 /parse/dir_map.py | |
| parent | 53cfcf10531256d0e4411a7e0bda431ec27f28e7 (diff) | |
Bug fixes for scaling factors.wip-mc
Diffstat (limited to 'parse/dir_map.py')
| -rw-r--r-- | parse/dir_map.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/dir_map.py b/parse/dir_map.py index 319a5de..499c712 100644 --- a/parse/dir_map.py +++ b/parse/dir_map.py | |||
| @@ -44,7 +44,7 @@ class DirMap(object): | |||
| 44 | if not base_type in measurement: | 44 | if not base_type in measurement: |
| 45 | continue | 45 | continue |
| 46 | # Ex: wcet/avg/max/vary-type/other-stuff.csv | 46 | # Ex: wcet/avg/max/vary-type/other-stuff.csv |
| 47 | path = [ stat, summary_type, base_type, "vary-%s" % vary ] | 47 | path = [ stat, summary_type, base_type, "vary-%s" % vary ] |
| 48 | result = measurement[base_type] | 48 | result = measurement[base_type] |
| 49 | 49 | ||
| 50 | self.__update_node(path, keys, (vary_value, result)) | 50 | self.__update_node(path, keys, (vary_value, result)) |
| @@ -68,7 +68,7 @@ class DirMap(object): | |||
| 68 | if node.values: | 68 | if node.values: |
| 69 | # Leaf | 69 | # Leaf |
| 70 | with open("/".join(path), "w") as f: | 70 | with open("/".join(path), "w") as f: |
| 71 | arr = [",".join([str(b) for b in n]) for n in node.values] | 71 | arr = [", ".join([str(b) for b in n]) for n in sorted(node.values, key=lambda node: int(node[0]))] |
| 72 | f.write("\n".join(arr) + "\n") | 72 | f.write("\n".join(arr) + "\n") |
| 73 | elif not os.path.isdir(out_path): | 73 | elif not os.path.isdir(out_path): |
| 74 | os.mkdir(out_path) | 74 | os.mkdir(out_path) |
