diff options
Diffstat (limited to 'plot.py')
| -rwxr-xr-x | plot.py | 71 |
1 files changed, 71 insertions, 0 deletions
| @@ -504,6 +504,76 @@ class SchedPlotter(defapp.App): | |||
| 504 | else: | 504 | else: |
| 505 | self.plot(gs, title, xname, conf) | 505 | self.plot(gs, title, xname, conf) |
| 506 | 506 | ||
| 507 | def plot_semipart(self, tmpfile, name, conf): | ||
| 508 | if 'soft' in conf: | ||
| 509 | titles = ['P-EDF (load)', 'P-EDF (idle)'] | ||
| 510 | else: | ||
| 511 | titles = ['C-EDF (load)', 'C-EDF (idle)'] | ||
| 512 | |||
| 513 | titles += [ | ||
| 514 | 'EDF-WM (load)', | ||
| 515 | 'EDF-WM (idle)', | ||
| 516 | 'NPS-F (load, delta=1)', | ||
| 517 | 'NPS-F (load, delta=4)', | ||
| 518 | 'NPS-F (idle, delta=1)', | ||
| 519 | 'NPS-F (idle, delta=4)', | ||
| 520 | 'C-NPS-F (load, delta=1)', | ||
| 521 | 'C-NPS-F (load, delta=4)', | ||
| 522 | 'C-NPS-F (idle, delta=1)', | ||
| 523 | 'C-NPS-F (idle, delta=4)'] | ||
| 524 | |||
| 525 | if 'soft' in conf: | ||
| 526 | titles += [ | ||
| 527 | 'EDF-fm (load)', | ||
| 528 | 'EDF-fm (idle)', | ||
| 529 | ] | ||
| 530 | |||
| 531 | p = self.make_plot(name) | ||
| 532 | |||
| 533 | p.title = scenario_heading(conf, True) | ||
| 534 | |||
| 535 | if 'sched' in conf: | ||
| 536 | p.curves += [curve(fname=tmpfile, xcol=2, ycol=(y + 3), title=t) | ||
| 537 | for (y, t) in enumerate(titles)] | ||
| 538 | p.ylabel = "ratio of schedulable task sets" | ||
| 539 | p.xlabel = "task set utilization cap (prior to overhead accounting)" | ||
| 540 | p.xticks = (0, 1) | ||
| 541 | p.xrange = (0.95, 24.05) | ||
| 542 | p.title += "; %skB WSS" % conf['key'] | ||
| 543 | elif 'wsched' in conf: | ||
| 544 | p.curves += [curve(fname=tmpfile, xcol=1, ycol=(y + 3), title=t) | ||
| 545 | for (y, t) in enumerate(titles)] | ||
| 546 | p.xlabel = "working set size (WSS)" | ||
| 547 | p.ylabel = "weighted schedulability" | ||
| 548 | p.xticks = (0, 64) | ||
| 549 | else: | ||
| 550 | self.err("What kind of semipart experiment is this?") | ||
| 551 | |||
| 552 | |||
| 553 | #### Styling. | ||
| 554 | |||
| 555 | if not self.setup_png(p): | ||
| 556 | p.rounded_caps = True | ||
| 557 | p.font = 'Helvetica' | ||
| 558 | |||
| 559 | p.font_size = '10' | ||
| 560 | p.size = ('20cm', '10cm') | ||
| 561 | p.monochrome = False | ||
| 562 | p.dashed_lines = True | ||
| 563 | p.key = 'below' | ||
| 564 | p.default_style = 'lines lw 6' | ||
| 565 | |||
| 566 | if self.options.smooth: | ||
| 567 | p.default_style += " smooth bezier" | ||
| 568 | |||
| 569 | p.ylabel += (' [soft]' if 'soft' in conf else ' [hard]') | ||
| 570 | |||
| 571 | if self.options.save_script: | ||
| 572 | p.gnuplot_save(p.output + '.plot') | ||
| 573 | else: | ||
| 574 | p.gnuplot_exec() | ||
| 575 | |||
| 576 | |||
| 507 | def plot_file(self, datafile): | 577 | def plot_file(self, datafile): |
| 508 | bname = basename(datafile) | 578 | bname = basename(datafile) |
| 509 | name, ext = splitext(bname) | 579 | name, ext = splitext(bname) |
| @@ -528,6 +598,7 @@ class SchedPlotter(defapp.App): | |||
| 528 | 'rtss08' : self.plot_rtss08, | 598 | 'rtss08' : self.plot_rtss08, |
| 529 | 'rtss09' : self.plot_rtss09_split if self.options.split else self.plot_rtss09, | 599 | 'rtss09' : self.plot_rtss09_split if self.options.split else self.plot_rtss09, |
| 530 | 'ospert10' : self.plot_ospert10, | 600 | 'ospert10' : self.plot_ospert10, |
| 601 | 'rtas11' : self.plot_semipart, | ||
| 531 | } | 602 | } |
| 532 | 603 | ||
| 533 | if self.options.experiment: | 604 | if self.options.experiment: |
