aboutsummaryrefslogtreecommitdiffstats
path: root/plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'plot.py')
-rwxr-xr-xplot.py40
1 files changed, 37 insertions, 3 deletions
diff --git a/plot.py b/plot.py
index befd7ee..426b77c 100755
--- a/plot.py
+++ b/plot.py
@@ -67,6 +67,8 @@ def scenario_heading(conf, want_period=False):
67 dist = dist + 'in [0.1, 0.4]' 67 dist = dist + 'in [0.1, 0.4]'
68 elif 'heavy' in conf: 68 elif 'heavy' in conf:
69 dist = dist + 'in [0.5, 0.9]' 69 dist = dist + 'in [0.5, 0.9]'
70 elif 'mixed' in conf:
71 dist = dist + 'in [0.05, 0.95]'
70 elif conf['dist'] == 'bimo': 72 elif conf['dist'] == 'bimo':
71 dist = 'util. bimodially ' 73 dist = 'util. bimodially '
72 if 'light' in conf: 74 if 'light' in conf:
@@ -91,7 +93,7 @@ class SchedPlotter(defapp.App):
91 def plot(self, graphs, title, name, conf, **xtra): 93 def plot(self, graphs, title, name, conf, **xtra):
92 gnuplot(graphs, title=title, 94 gnuplot(graphs, title=title,
93 xlabel=self.options.xlabel, 95 xlabel=self.options.xlabel,
94 ylabel=self.options.ylabel + 96 ylabel=self.options.ylabel +
95 (' [soft]' if 'soft' in conf else ' [hard]'), 97 (' [soft]' if 'soft' in conf else ' [hard]'),
96 xrange=self.options.xrange, 98 xrange=self.options.xrange,
97 yrange=self.options.yrange, 99 yrange=self.options.yrange,
@@ -104,7 +106,7 @@ class SchedPlotter(defapp.App):
104 tops = 'rounded size 16cm,6.5cm' 106 tops = 'rounded size 16cm,6.5cm'
105 gnuplot(graphs, title=title, 107 gnuplot(graphs, title=title,
106 xlabel=self.options.xlabel, 108 xlabel=self.options.xlabel,
107 ylabel=self.options.ylabel + 109 ylabel=self.options.ylabel +
108 (' [soft]' if 'soft' in conf else ' [hard]'), 110 (' [soft]' if 'soft' in conf else ' [hard]'),
109 xrange=self.options.xrange, 111 xrange=self.options.xrange,
110 yrange=self.options.yrange, 112 yrange=self.options.yrange,
@@ -119,7 +121,7 @@ class SchedPlotter(defapp.App):
119 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'
120 gnuplot(graphs, title=title, 122 gnuplot(graphs, title=title,
121 xlabel=self.options.xlabel, 123 xlabel=self.options.xlabel,
122 ylabel=self.options.ylabel + 124 ylabel=self.options.ylabel +
123 (' [soft]' if 'soft' in conf else ' [hard]'), 125 (' [soft]' if 'soft' in conf else ' [hard]'),
124 xrange=self.options.xrange, 126 xrange=self.options.xrange,
125 yrange=self.options.yrange, 127 yrange=self.options.yrange,
@@ -264,6 +266,36 @@ class SchedPlotter(defapp.App):
264 else: 266 else:
265 self.plot(graphs, title, xname, conf) 267 self.plot(graphs, title, xname, conf)
266 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
267 def plot_file(self, datafile): 299 def plot_file(self, datafile):
268 bname = basename(datafile) 300 bname = basename(datafile)
269 name, ext = splitext(bname) 301 name, ext = splitext(bname)
@@ -288,6 +320,8 @@ class SchedPlotter(defapp.App):
288 self.plot_rtss09_split(tmpfile.name, name, conf) 320 self.plot_rtss09_split(tmpfile.name, name, conf)
289 else: 321 else:
290 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)
291 else: 325 else:
292 self.err("Skipped '%s'; unkown experiment type." 326 self.err("Skipped '%s'; unkown experiment type."
293 % bname) 327 % bname)