aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-04-10 13:20:31 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-04-10 13:20:31 -0400
commitd7d9c89f404468dd9fe9c6eae70496fe60367ff2 (patch)
tree2f1394e40bbb9d767a7d49206cf582b8668df0da
parent3dec38c73bceeb13f0ee6e19a04983c7c43d8106 (diff)
Add support for EMSOFT'11 experiment plotting.
-rwxr-xr-xplot.py90
1 files changed, 90 insertions, 0 deletions
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):
673 p.gnuplot_exec() 673 p.gnuplot_exec()
674 674
675 675
676 def plot_mpcp_omlp(self, tmpfile, name, conf):
677 curves = [
678 ('MPCP (virtual spinning)', 5),
679 ('MPCP (suspension-based)', 4),
680 ('OMLP (mutex, c=1)', 6),
681 ]
682
683 p = self.make_plot(name)
684
685 if 'ucap' in conf and 'pacc' in conf:
686 xcol = 1
687 p.xlabel = 'resource probability'
688 p.xrange = (0, 1)
689 tinfo = ' utilization=%s request-probability=%s' % \
690 (conf['ucap'], conf['pacc'])
691 elif 'ucap' in conf and 'pres' in conf:
692 xcol = 2
693 p.xlabel = 'request probability'
694 p.xrange = (0, 0.8)
695 tinfo = ' utilization=%s resource-probability=%s' % \
696 (conf['ucap'], conf['pres'])
697 else:
698 xcol = 3
699 p.xlabel = 'per-processor utilization (prior to blocking accounting)'
700 p.xrange = (0.2, 1)
701 tinfo = ' request-probability=%s resource-probability=%s' % \
702 (conf['pacc'], conf['pres'])
703
704 pinfo = " m=%s" % conf['m']
705
706 p.title = scenario_heading(conf, True) + r'\n' + tinfo + pinfo
707
708 p.ylabel = "ratio of schedulable task sets"
709 p.yrange = (-0.05, 1.05)
710 p.yticks = (0, 0.1)
711 p.xticks = (0, 0.1)
712
713 p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t)
714 for (t, idx) in curves]
715
716 #### Styling.
717
718 if not self.setup_png(p):
719 p.rounded_caps = True
720 p.font = 'Helvetica'
721
722 if self.options.paper:
723 p.default_style = 'lines lw 2.5'
724 p.font_size = '5pt'
725 p.size = ('8.5cm', '5.25cm')
726 p.monochrome = False
727 p.dashed_lines = False
728 if not self.options.alternate:
729 p.key ='off'
730 p.size = ('9cm', '4.0cm')
731 p.yticks = (0, 0.1)
732 p.key = 'bottom left'
733 p.default_style = 'linespoints lw 3.5'
734 elif self.options.slides:
735 p.dashed_lines = False
736 p.monochrome = False
737 p.rounded_caps = True
738 p.default_style = 'lines lw 10'
739 p.key = 'below'
740 elif self.options.appendix:
741 # for the appendix
742 p.font_size = '8'
743 p.size = ('17cm', '9cm')
744 p.key = 'below'
745 p.monochrome = False
746 p.dashed_lines = False
747 p.default_style = 'linespoints lw 3.5'
748 else:
749 p.font_size = '10'
750 p.size = ('20cm', '10cm')
751 p.monochrome = False
752 p.dashed_lines = False
753 p.key = 'below'
754 p.default_style = 'linespoints lw 1'
755
756 if self.options.smooth:
757 p.default_style += " smooth bezier"
758
759 if self.options.save_script:
760 p.gnuplot_save(p.output + '.plot')
761 else:
762 p.gnuplot_exec()
763
764
676 def plot_file(self, datafile): 765 def plot_file(self, datafile):
677 bname = basename(datafile) 766 bname = basename(datafile)
678 name, ext = splitext(bname) 767 name, ext = splitext(bname)
@@ -698,6 +787,7 @@ class SchedPlotter(defapp.App):
698 'rtss09' : self.plot_rtss09_split if self.options.split else self.plot_rtss09, 787 'rtss09' : self.plot_rtss09_split if self.options.split else self.plot_rtss09,
699 'ospert10' : self.plot_ospert10, 788 'ospert10' : self.plot_ospert10,
700 'eurosys11' : self.plot_semipart, 789 'eurosys11' : self.plot_semipart,
790 'emsoft11-part' : self.plot_mpcp_omlp,
701 } 791 }
702 792
703 if self.options.experiment: 793 if self.options.experiment: