From dcf56edd1b4ea14c73bc4558a4465623e20c478f Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Thu, 14 May 2009 16:09:53 -0400 Subject: add split graph plotting --- plot.py | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'plot.py') diff --git a/plot.py b/plot.py index 88035f9..83855e8 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, '--split', action='store_true', dest='split'), ] defaults = { @@ -22,6 +23,7 @@ defaults = { 'xlabel' : 'task set utilization cap (prior to inflation)', 'ylabel' : 'ratio of schedulable task sets', 'paper' : False, + 'split' : False, } def decode(name): @@ -197,6 +199,45 @@ class SchedPlotter(defapp.App): 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') + + subgraphs = [ +# dedicated vs. non-dedicated + [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 4, 'SE1')], + [(tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1')], + [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 9, 'SQ1')], + +# fine-grained vs. sequential + [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 5, 'FEm')], + [(tmpfile, 1, 4, 'SE1'), (tmpfile, 1, 6, 'FE1')], + +# hierarchical vs. sequential + [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 7, 'HEm')], + +# quantum vs. event + [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 8, 'SQm')], + [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'SQ1')], + ] + staggered = [ +# dedicated vs. non-dedicated + [(tmpfile, 1, 10, 'S-SQm'), (tmpfile, 1, 11, 'S-SQ1')], + +# staggered vs. non-staggered + [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 10, 'S-SQm')], + [(tmpfile, 1, 9, 'SQ1'), (tmpfile, 1, 11, 'S-SQ1')], + ] + if 'hard' in conf: + subgraphs += staggered + for g in subgraphs: + graphs = [ideal] + g + 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) + else: + self.plot(graphs, title, xname, conf) + def plot_file(self, datafile): bname = basename(datafile) name, ext = splitext(bname) @@ -217,7 +258,10 @@ class SchedPlotter(defapp.App): elif 'irq' in conf: self.plot_irq(tmpfile.name, name, conf) elif 'rtss09' in conf: - self.plot_rtss09(tmpfile.name, name, conf) + if self.options.split: + self.plot_rtss09_split(tmpfile.name, name, conf) + else: + self.plot_rtss09(tmpfile.name, name, conf) else: self.err("Skipped '%s'; unkown experiment type." % bname) -- cgit v1.2.2