From fbfac3ea825a863400f7196750f016b6a6a0d48d Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 1 Jun 2009 08:58:39 -0700 Subject: appendix work --- plot.py | 62 ++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 18 deletions(-) (limited to 'plot.py') diff --git a/plot.py b/plot.py index 83855e8..befd7ee 100755 --- a/plot.py +++ b/plot.py @@ -10,6 +10,7 @@ options = [ o('-f', '--format', action='store', dest='format', type='choice', choices=FORMATS, help='output format'), o(None, '--paper', action='store_true', dest='paper'), + o(None, '--wide', action='store_true', dest='wide'), o(None, '--split', action='store_true', dest='split'), ] @@ -24,6 +25,7 @@ defaults = { 'ylabel' : 'ratio of schedulable task sets', 'paper' : False, 'split' : False, + 'wide' : False, } def decode(name): @@ -98,6 +100,21 @@ class SchedPlotter(defapp.App): format=self.options.format, fname=name, **xtra) + def plot_wide(self, graphs, title, name, conf, **xtra): + tops = 'rounded size 16cm,6.5cm' + gnuplot(graphs, title=title, + xlabel=self.options.xlabel, + ylabel=self.options.ylabel + + (' [soft]' if 'soft' in conf else ' [hard]'), + xrange=self.options.xrange, + yrange=self.options.yrange, + xticks=self.options.xticks, + yticks=self.options.yticks, + format=self.options.format, + fname=name, + term_opts=tops, + **xtra) + def plot_paper(self, graphs, title, name, conf, **xtra): tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' gnuplot(graphs, title=title, @@ -179,54 +196,61 @@ class SchedPlotter(defapp.App): def plot_rtss09(self, tmpfile, name, conf): title = scenario_heading(conf, want_period=True) graphs = [ - (tmpfile, 1, 2, 'ideal'), - (tmpfile, 1, 3, 'SEm'), - (tmpfile, 1, 4, 'SE1'), + (tmpfile, 1, 2, 'G-EDF'), + (tmpfile, 1, 3, 'CEm'), + (tmpfile, 1, 4, 'CE1'), (tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 7, 'HEm'), - (tmpfile, 1, 8, 'SQm'), - (tmpfile, 1, 9, 'SQ1'), + (tmpfile, 1, 8, 'CQm'), + (tmpfile, 1, 9, 'CQ1'), ] staggered = [ - (tmpfile, 1, 10, 'S-SQm'), - (tmpfile, 1, 11, 'S-SQ1'), + (tmpfile, 1, 10, 'S-CQm'), + (tmpfile, 1, 11, 'S-CQ1'), ] if 'hard' in conf: graphs += staggered if self.options.paper and self.options.format == 'pdf': self.plot_paper(graphs, title, name, conf) + elif self.options.wide and self.options.format == 'pdf': + self.plot_wide(graphs, title, name, conf) else: self.plot(graphs, title, name, conf) def plot_rtss09_split(self, tmpfile, name, conf): title = scenario_heading(conf, want_period=True) - ideal = (tmpfile, 1, 2, 'ideal') + ideal = (tmpfile, 1, 2, 'G-EDF') subgraphs = [ # dedicated vs. non-dedicated - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 4, 'SE1')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 4, 'CE1')], [(tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1')], - [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 9, 'SQ1')], + [(tmpfile, 1, 8, 'CQm'), (tmpfile, 1, 9, 'CQ1')], # fine-grained vs. sequential - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 5, 'FEm')], - [(tmpfile, 1, 4, 'SE1'), (tmpfile, 1, 6, 'FE1')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 5, 'FEm')], + [(tmpfile, 1, 4, 'CE1'), (tmpfile, 1, 6, 'FE1')], # hierarchical vs. sequential - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 7, 'HEm')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 7, 'HEm')], # quantum vs. event - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 8, 'SQm')], - [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'SQ1')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 8, 'CQm')], + [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'CQ1')], ] staggered = [ # dedicated vs. non-dedicated - [(tmpfile, 1, 10, 'S-SQm'), (tmpfile, 1, 11, 'S-SQ1')], + [(tmpfile, 1, 10, 'S-CQm'), (tmpfile, 1, 11, 'S-CQ1')], # staggered vs. non-staggered - [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 10, 'S-SQm')], - [(tmpfile, 1, 9, 'SQ1'), (tmpfile, 1, 11, 'S-SQ1')], + [(tmpfile, 1, 8, 'CQm'), (tmpfile, 1, 10, 'S-CQm')], + [(tmpfile, 1, 9, 'CQ1'), (tmpfile, 1, 11, 'S-CQ1')], + +# quantum vs. event + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 10, 'S-CQm')], + [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 11, 'S-CQ1')], + ] if 'hard' in conf: subgraphs += staggered @@ -235,6 +259,8 @@ class SchedPlotter(defapp.App): xname = name + '_' + '-vs-'.join([x[3] for x in g]) if self.options.paper and self.options.format == 'pdf': self.plot_paper(graphs, title, xname, conf) + elif self.options.wide and self.options.format == 'pdf': + self.plot_wide(graphs, title, xname, conf) else: self.plot(graphs, title, xname, conf) -- cgit v1.2.2