diff options
Diffstat (limited to 'compact_pm_ovd.py')
| -rwxr-xr-x | compact_pm_ovd.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compact_pm_ovd.py b/compact_pm_ovd.py index 0a25e0c..3b646ca 100755 --- a/compact_pm_ovd.py +++ b/compact_pm_ovd.py | |||
| @@ -18,11 +18,7 @@ def build_name(dirname, conf, wss_list): | |||
| 18 | if dirname == '': | 18 | if dirname == '': |
| 19 | dirname = '.' | 19 | dirname = '.' |
| 20 | outname = dirname + '/' | 20 | outname = dirname + '/' |
| 21 | if 'hard' in conf: | 21 | outname += 'pm_plugin=' + conf['plugin'] + '_dist=' + conf['dist'] |
| 22 | outname += 'hard' | ||
| 23 | else: | ||
| 24 | outname += 'soft' | ||
| 25 | outname += '_pm_plugin=' + conf['plugin'] + '_dist=' + conf['dist'] | ||
| 26 | # atm we use only uniform for PM (we also use only light, but...) | 22 | # atm we use only uniform for PM (we also use only light, but...) |
| 27 | if 'light' in conf: | 23 | if 'light' in conf: |
| 28 | outname += '_light' | 24 | outname += '_light' |
| @@ -64,8 +60,7 @@ class WSSCompactor(): | |||
| 64 | self.wss_list.sort() | 60 | self.wss_list.sort() |
| 65 | outname = build_name(dirname, conf, self.wss_list) | 61 | outname = build_name(dirname, conf, self.wss_list) |
| 66 | csvf = open(outname, 'w') | 62 | csvf = open(outname, 'w') |
| 67 | csvf.write('# preemption and migration overhead for ' + \ | 63 | csvf.write('# ' + conf['plugin'] + ' ' + conf['ovd'] + '\n') |
| 68 | conf['plugin'] + '\n') | ||
| 69 | 64 | ||
| 70 | wstr = '# tssize, ' | 65 | wstr = '# tssize, ' |
| 71 | for wss in self.wss_list: | 66 | for wss in self.wss_list: |
| @@ -82,6 +77,8 @@ class WSSCompactor(): | |||
| 82 | for value in self.ovhead_table[str(key)]: | 77 | for value in self.ovhead_table[str(key)]: |
| 83 | if float(value) > 0: | 78 | if float(value) > 0: |
| 84 | wstr += value + ', ' | 79 | wstr += value + ', ' |
| 80 | else: | ||
| 81 | wstr += '0.00000, ' | ||
| 85 | wstr = wstr[0:-2] | 82 | wstr = wstr[0:-2] |
| 86 | csvf.write(wstr + '\n') | 83 | csvf.write(wstr + '\n') |
| 87 | 84 | ||
