From 0fbeff4a0887a48dea0a95a1d51e4ff9766c8d12 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Sat, 27 Mar 2010 11:54:54 -0400 Subject: Fix "proper" iteration on arrays and typos --- compact_pm_ovd.py | 11 +++-------- plot_pm.py | 14 +++++++------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/compact_pm_ovd.py b/compact_pm_ovd.py index 4670de0..10151d4 100755 --- a/compact_pm_ovd.py +++ b/compact_pm_ovd.py @@ -57,14 +57,9 @@ class WSSCompactor(): wstr += 'wss=' + str(wss) + ':(max, avg), ' csvf.write(wstr[0:-2] + '\n') - tkeys = self.ovhead_table.keys() - for i in range(0,len(tkeys)): - tkeys[i] = int(tkeys[i]) - tkeys.sort() - - for key in tkeys: - wstr = str(key) + ', ' - for value in self.ovhead_table[str(key)]: + for key in sorted(self.ovhead_table.keys(), key=int): + wstr = key + ', ' + for value in self.ovhead_table[key]: if float(value) > 0: wstr += value + ', ' else: diff --git a/plot_pm.py b/plot_pm.py index 22f6d6e..c2b501c 100755 --- a/plot_pm.py +++ b/plot_pm.py @@ -27,10 +27,10 @@ defaults = { 'alloh' : False, 'type' : 'hard', 'format' : 'show', - 'xrange' : (99.5, 200.5), - 'yrange' : (0, 5300.05), - 'xticks' : (0, 10), - 'yticks' : (0, 100), + 'xrange' : (74.5, 250.5), + 'yrange' : (0, 5000), + 'xticks' : (0, 25), + 'yticks' : (0, 250), 'title' : None, 'xlabel' : 'number of tasks', 'ylabel' : 'overhead (us)', @@ -134,8 +134,8 @@ class PmPlotter(defapp.App): self.plot(graphs, title, name, conf) def add_to_graph_list(self, tmpfile, name, conf): - self.title += overhead_heading(conf, sharedL3=self.options.sharedL3) - self.title += ' ; ' + #self.title += overhead_heading(conf, sharedL3=self.options.sharedL3) + #self.title += ' ; ' wsslist = conf['wss'].split(',') wsspos = 2 if 'soft' in conf: @@ -175,7 +175,7 @@ class PmPlotter(defapp.App): else: self.plot_pm(tmpfile.name, name, conf) else: - self.err("Skipped '%s'; unkown experiment type." + self.err("Skipped '%s'; unknown experiment type." % bname) if self.options.alloh: -- cgit v1.2.2