From d7d9c89f404468dd9fe9c6eae70496fe60367ff2 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Sun, 10 Apr 2011 13:20:31 -0400 Subject: Add support for EMSOFT'11 experiment plotting. --- plot.py | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) (limited to 'plot.py') diff --git a/plot.py b/plot.py index 353ae75..c618b1c 100755 --- a/plot.py +++ b/plot.py @@ -673,6 +673,95 @@ class SchedPlotter(defapp.App): p.gnuplot_exec() + def plot_mpcp_omlp(self, tmpfile, name, conf): + curves = [ + ('MPCP (virtual spinning)', 5), + ('MPCP (suspension-based)', 4), + ('OMLP (mutex, c=1)', 6), + ] + + p = self.make_plot(name) + + if 'ucap' in conf and 'pacc' in conf: + xcol = 1 + p.xlabel = 'resource probability' + p.xrange = (0, 1) + tinfo = ' utilization=%s request-probability=%s' % \ + (conf['ucap'], conf['pacc']) + elif 'ucap' in conf and 'pres' in conf: + xcol = 2 + p.xlabel = 'request probability' + p.xrange = (0, 0.8) + tinfo = ' utilization=%s resource-probability=%s' % \ + (conf['ucap'], conf['pres']) + else: + xcol = 3 + p.xlabel = 'per-processor utilization (prior to blocking accounting)' + p.xrange = (0.2, 1) + tinfo = ' request-probability=%s resource-probability=%s' % \ + (conf['pacc'], conf['pres']) + + pinfo = " m=%s" % conf['m'] + + p.title = scenario_heading(conf, True) + r'\n' + tinfo + pinfo + + p.ylabel = "ratio of schedulable task sets" + p.yrange = (-0.05, 1.05) + p.yticks = (0, 0.1) + p.xticks = (0, 0.1) + + p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t) + for (t, idx) in curves] + + #### Styling. + + if not self.setup_png(p): + p.rounded_caps = True + p.font = 'Helvetica' + + if self.options.paper: + p.default_style = 'lines lw 2.5' + p.font_size = '5pt' + p.size = ('8.5cm', '5.25cm') + p.monochrome = False + p.dashed_lines = False + if not self.options.alternate: + p.key ='off' + p.size = ('9cm', '4.0cm') + p.yticks = (0, 0.1) + p.key = 'bottom left' + p.default_style = 'linespoints lw 3.5' + elif self.options.slides: + p.dashed_lines = False + p.monochrome = False + p.rounded_caps = True + p.default_style = 'lines lw 10' + p.key = 'below' + elif self.options.appendix: + # for the appendix + p.font_size = '8' + p.size = ('17cm', '9cm') + p.key = 'below' + p.monochrome = False + p.dashed_lines = False + p.default_style = 'linespoints lw 3.5' + else: + p.font_size = '10' + p.size = ('20cm', '10cm') + p.monochrome = False + p.dashed_lines = False + p.key = 'below' + p.default_style = 'linespoints lw 1' + + if self.options.smooth: + p.default_style += " smooth bezier" + + if self.options.save_script: + p.gnuplot_save(p.output + '.plot') + else: + p.gnuplot_exec() + + def plot_file(self, datafile): bname = basename(datafile) name, ext = splitext(bname) @@ -698,6 +787,7 @@ class SchedPlotter(defapp.App): 'rtss09' : self.plot_rtss09_split if self.options.split else self.plot_rtss09, 'ospert10' : self.plot_ospert10, 'eurosys11' : self.plot_semipart, + 'emsoft11-part' : self.plot_mpcp_omlp, } if self.options.experiment: -- cgit v1.2.2