From 24b538b1857f4fb0399ee3263dc737a81c07219c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=2E=20Brandenburg?= Date: Sat, 20 Mar 2010 13:27:20 -0400 Subject: Add support for ospert10 plotting. And fix some whitespace issues. --- plot.py | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'plot.py') diff --git a/plot.py b/plot.py index 6e6f006..426b77c 100755 --- a/plot.py +++ b/plot.py @@ -93,7 +93,7 @@ class SchedPlotter(defapp.App): def plot(self, graphs, title, name, conf, **xtra): gnuplot(graphs, title=title, xlabel=self.options.xlabel, - ylabel=self.options.ylabel + + ylabel=self.options.ylabel + (' [soft]' if 'soft' in conf else ' [hard]'), xrange=self.options.xrange, yrange=self.options.yrange, @@ -106,7 +106,7 @@ class SchedPlotter(defapp.App): tops = 'rounded size 16cm,6.5cm' gnuplot(graphs, title=title, xlabel=self.options.xlabel, - ylabel=self.options.ylabel + + ylabel=self.options.ylabel + (' [soft]' if 'soft' in conf else ' [hard]'), xrange=self.options.xrange, yrange=self.options.yrange, @@ -121,7 +121,7 @@ class SchedPlotter(defapp.App): tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' gnuplot(graphs, title=title, xlabel=self.options.xlabel, - ylabel=self.options.ylabel + + ylabel=self.options.ylabel + (' [soft]' if 'soft' in conf else ' [hard]'), xrange=self.options.xrange, yrange=self.options.yrange, @@ -266,6 +266,36 @@ class SchedPlotter(defapp.App): else: self.plot(graphs, title, xname, conf) + def plot_ospert10(self, tmpfile, name, conf): + title = scenario_heading(conf, want_period=True) + # cumulative graphs + graphs = [ + (tmpfile, 1, 2, 'G-EDF'), + (tmpfile, 1, 4, 'C-EDF (L3)'), + (tmpfile, 1, 6, 'C-EDF (L2)'), + (tmpfile, 1, 8, 'P-EDF'), + ] + # weighted graphs + graphs_w = [ + (tmpfile, 1, 3, 'G-EDF'), + (tmpfile, 1, 5, 'C-EDF (L3)'), + (tmpfile, 1, 7, 'C-EDF (L2)'), + (tmpfile, 1, 9, 'P-EDF'), + ] + + self.options.xrange = (-5, 1005) + self.options.xticks = (0, 50) + self.options.xlabel = "preemption/migration overhead (in us)" + for (tag, gs) in [('cumulative', graphs), ('weighted', graphs_w)]: + xname = name + '_' + tag + self.options.ylabel = tag + ' schedulability' + if self.options.paper and self.options.format == 'pdf': + self.plot_paper(gs, title, xname, conf) + elif self.options.wide and self.options.format == 'pdf': + self.plot_wide(gs, title, xname, conf) + else: + self.plot(gs, title, xname, conf) + def plot_file(self, datafile): bname = basename(datafile) name, ext = splitext(bname) @@ -290,6 +320,8 @@ class SchedPlotter(defapp.App): self.plot_rtss09_split(tmpfile.name, name, conf) else: self.plot_rtss09(tmpfile.name, name, conf) + elif 'ospert10' in conf: + self.plot_ospert10(tmpfile.name, name, conf) else: self.err("Skipped '%s'; unkown experiment type." % bname) -- cgit v1.2.2