From 36a1d6ef801fe2ade27e173b23bb13fe29213d11 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Tue, 23 Mar 2010 14:58:21 -0400 Subject: Change format from [hard|soft]_pm.. to pm... - Requested plot type (default hard rt) is specified through option --type - Add overhead type in csv files as a comment - Fix wrong compacting (columns shuffling) - Minor fixes --- plot_pm.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'plot_pm.py') diff --git a/plot_pm.py b/plot_pm.py index 2fb04c5..9190d8e 100755 --- a/plot_pm.py +++ b/plot_pm.py @@ -24,9 +24,10 @@ output WHEN using --all'), defaults = { 'sharedL3' : False, 'alloh' : False, + 'type' : 'hard', 'format' : 'show', 'xrange' : (74.5, 250.5), - 'yrange' : (0, 4300.05), + 'yrange' : (0, 4350.05), 'xticks' : (0, 10), 'yticks' : (0, 100), 'title' : None, @@ -167,12 +168,16 @@ class PmPlotter(defapp.App): title = overhead_heading(conf, sharedL3=self.options.sharedL3) title += ' ; ' + scenario_heading(conf, want_period=True) plugin = conf['plugin'] + if 'soft' in conf: + name = 'soft_' + name + else: + name = 'hard_' + name wsslist = conf['wss'].split(',') graphs = [] wsspos = 2 + if 'soft' in conf: + wsspos += 1 for i in wsslist: - if 'soft' in conf: - wsspos += 1 label = plugin + ' WSS=' + i graphs.append((tmpfile, 1, wsspos, label)) wsspos += 2 @@ -189,21 +194,21 @@ class PmPlotter(defapp.App): self.title += ' ; ' wsslist = conf['wss'].split(',') wsspos = 2 + if 'soft' in conf: + wsspos += 1 for i in wsslist: - if 'soft' in conf: - wsspos += 1 label = conf['plugin'] + ' ' + conf['ovd'] + ' WSS=' + i self.graphs_list.append((tmpfile, 1, wsspos, label)) wsspos += 2 - def plot_graph_list(self, name='blob', conf='hard'): + def plot_graph_list(self, type, name='blob'): self.title = self.title[0:-3] if self.options.paper and self.options.format == 'pdf': - self.plot_paper(self.graphs_list, self.title, name, conf) + self.plot_paper(self.graphs_list, self.title, name, type) elif self.options.wide and self.options.format == 'pdf': - self.plot_wide(self.graphs_list, self.title, name, conf) + self.plot_wide(self.graphs_list, self.title, name, type) else: - self.plot(self.graphs_list, self.title, name, conf) + self.plot(self.graphs_list, self.title, name, type) # delete temporary data files for tmp in self.tmpfile_list: @@ -220,6 +225,7 @@ class PmPlotter(defapp.App): tmpfile = get_data_tmpfile(datafile) if tmpfile: if 'pm' in conf: + conf[self.options.type] = None if self.options.alloh: self.add_to_graph_list(tmpfile.name, name, conf) else: @@ -244,7 +250,7 @@ class PmPlotter(defapp.App): if self.options.alloh: # also clean up tmp data files - self.plot_graph_list(self.options.name, self.options.type) + self.plot_graph_list(self.options.type, self.options.name) if __name__ == "__main__": PmPlotter().launch() -- cgit v1.2.2