aboutsummaryrefslogtreecommitdiffstats
path: root/plot.py
diff options
context:
space:
mode:
authorBjörn B. Brandenburg <bbb@cs.unc.edu>2010-03-20 13:27:20 -0400
committerBjörn B. Brandenburg <bbb@cs.unc.edu>2010-03-20 13:27:20 -0400
commit24b538b1857f4fb0399ee3263dc737a81c07219c (patch)
treedcdb86a5becfc6c3e80a9783ae54cc5b02376f89 /plot.py
parentabd5fc5441da3a2b1ba8427a5aa1847d9bb7daa5 (diff)
Add support for ospert10 plotting.
And fix some whitespace issues.
Diffstat (limited to 'plot.py')
-rwxr-xr-xplot.py38
1 files changed, 35 insertions, 3 deletions
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):
93 def plot(self, graphs, title, name, conf, **xtra): 93 def plot(self, graphs, title, name, conf, **xtra):
94 gnuplot(graphs, title=title, 94 gnuplot(graphs, title=title,
95 xlabel=self.options.xlabel, 95 xlabel=self.options.xlabel,
96 ylabel=self.options.ylabel + 96 ylabel=self.options.ylabel +
97 (' [soft]' if 'soft' in conf else ' [hard]'), 97 (' [soft]' if 'soft' in conf else ' [hard]'),
98 xrange=self.options.xrange, 98 xrange=self.options.xrange,
99 yrange=self.options.yrange, 99 yrange=self.options.yrange,
@@ -106,7 +106,7 @@ class SchedPlotter(defapp.App):
106 tops = 'rounded size 16cm,6.5cm' 106 tops = 'rounded size 16cm,6.5cm'
107 gnuplot(graphs, title=title, 107 gnuplot(graphs, title=title,
108 xlabel=self.options.xlabel, 108 xlabel=self.options.xlabel,
109 ylabel=self.options.ylabel + 109 ylabel=self.options.ylabel +
110 (' [soft]' if 'soft' in conf else ' [hard]'), 110 (' [soft]' if 'soft' in conf else ' [hard]'),
111 xrange=self.options.xrange, 111 xrange=self.options.xrange,
112 yrange=self.options.yrange, 112 yrange=self.options.yrange,
@@ -121,7 +121,7 @@ class SchedPlotter(defapp.App):
121 tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' 121 tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm'
122 gnuplot(graphs, title=title, 122 gnuplot(graphs, title=title,
123 xlabel=self.options.xlabel, 123 xlabel=self.options.xlabel,
124 ylabel=self.options.ylabel + 124 ylabel=self.options.ylabel +
125 (' [soft]' if 'soft' in conf else ' [hard]'), 125 (' [soft]' if 'soft' in conf else ' [hard]'),
126 xrange=self.options.xrange, 126 xrange=self.options.xrange,
127 yrange=self.options.yrange, 127 yrange=self.options.yrange,
@@ -266,6 +266,36 @@ class SchedPlotter(defapp.App):
266 else: 266 else:
267 self.plot(graphs, title, xname, conf) 267 self.plot(graphs, title, xname, conf)
268 268
269 def plot_ospert10(self, tmpfile, name, conf):
270 title = scenario_heading(conf, want_period=True)
271 # cumulative graphs
272 graphs = [
273 (tmpfile, 1, 2, 'G-EDF'),
274 (tmpfile, 1, 4, 'C-EDF (L3)'),
275 (tmpfile, 1, 6, 'C-EDF (L2)'),
276 (tmpfile, 1, 8, 'P-EDF'),
277 ]
278 # weighted graphs
279 graphs_w = [
280 (tmpfile, 1, 3, 'G-EDF'),
281 (tmpfile, 1, 5, 'C-EDF (L3)'),
282 (tmpfile, 1, 7, 'C-EDF (L2)'),
283 (tmpfile, 1, 9, 'P-EDF'),
284 ]
285
286 self.options.xrange = (-5, 1005)
287 self.options.xticks = (0, 50)
288 self.options.xlabel = "preemption/migration overhead (in us)"
289 for (tag, gs) in [('cumulative', graphs), ('weighted', graphs_w)]:
290 xname = name + '_' + tag
291 self.options.ylabel = tag + ' schedulability'
292 if self.options.paper and self.options.format == 'pdf':
293 self.plot_paper(gs, title, xname, conf)
294 elif self.options.wide and self.options.format == 'pdf':
295 self.plot_wide(gs, title, xname, conf)
296 else:
297 self.plot(gs, title, xname, conf)
298
269 def plot_file(self, datafile): 299 def plot_file(self, datafile):
270 bname = basename(datafile) 300 bname = basename(datafile)
271 name, ext = splitext(bname) 301 name, ext = splitext(bname)
@@ -290,6 +320,8 @@ class SchedPlotter(defapp.App):
290 self.plot_rtss09_split(tmpfile.name, name, conf) 320 self.plot_rtss09_split(tmpfile.name, name, conf)
291 else: 321 else:
292 self.plot_rtss09(tmpfile.name, name, conf) 322 self.plot_rtss09(tmpfile.name, name, conf)
323 elif 'ospert10' in conf:
324 self.plot_ospert10(tmpfile.name, name, conf)
293 else: 325 else:
294 self.err("Skipped '%s'; unkown experiment type." 326 self.err("Skipped '%s'; unkown experiment type."
295 % bname) 327 % bname)