diff options
-rwxr-xr-x | plot.py | 73 |
1 files changed, 46 insertions, 27 deletions
@@ -513,50 +513,69 @@ class SchedPlotter(defapp.App): | |||
513 | self.plot(gs, title, xname, conf) | 513 | self.plot(gs, title, xname, conf) |
514 | 514 | ||
515 | def plot_semipart(self, tmpfile, name, conf): | 515 | def plot_semipart(self, tmpfile, name, conf): |
516 | if 'soft' in conf: | 516 | if not 'soft' in conf: |
517 | titles = ['P-EDF (load)', 'P-EDF (idle)'] | 517 | cedf_titles = [('P-EDF (load)', 3), ('P-EDF (idle)', 4)] |
518 | else: | 518 | else: |
519 | titles = ['C-EDF (load)', 'C-EDF (idle)'] | 519 | cedf_titles = [('C-EDF (load)', 3), ('C-EDF (idle)', 4)] |
520 | 520 | ||
521 | titles += [ | 521 | edfwm_titles = [ |
522 | 'EDF-WM (load)', | 522 | ('EDF-WM (load)', 5), |
523 | 'EDF-WM (idle)', | 523 | ('EDF-WM (idle)', 6) |
524 | 'NPS-F (load, delta=1)', | 524 | ] |
525 | 'NPS-F (load, delta=4)', | 525 | |
526 | 'NPS-F (idle, delta=1)', | 526 | npsf_titles = [ |
527 | 'NPS-F (idle, delta=4)', | 527 | ('NPS-F (load, delta=1)', 7), |
528 | 'C-NPS-F (load, delta=1)', | 528 | ('NPS-F (load, delta=4)', 8), |
529 | 'C-NPS-F (load, delta=4)', | 529 | ('NPS-F (idle, delta=1)', 9), |
530 | 'C-NPS-F (idle, delta=1)', | 530 | ('NPS-F (idle, delta=4)', 10), |
531 | 'C-NPS-F (idle, delta=4)'] | 531 | ] |
532 | 532 | ||
533 | if 'soft' in conf: | 533 | cnpsf_titles = [ |
534 | titles += [ | 534 | ('C-NPS-F (load, delta=1)', 11), |
535 | 'EDF-fm (load)', | 535 | ('C-NPS-F (load, delta=4)', 12), |
536 | 'EDF-fm (idle)', | 536 | ('C-NPS-F (idle, delta=1)', 13), |
537 | ] | 537 | ('C-NPS-F (idle, delta=4)', 14), |
538 | ] | ||
539 | |||
540 | edffm_titles = [ | ||
541 | ('EDF-fm (load)', 15), | ||
542 | ('EDF-fm (idle)', 16), | ||
543 | ] | ||
544 | |||
545 | |||
546 | if self.options.alternate: | ||
547 | # NPS-F comparison | ||
548 | titles = npsf_titles + cnpsf_titles | ||
549 | else: | ||
550 | # all | ||
551 | titles = cedf_titles + edfwm_titles + npsf_titles + cnpsf_titles | ||
552 | if 'soft' in conf: | ||
553 | titles += edffm_titles | ||
538 | 554 | ||
539 | p = self.make_plot(name) | 555 | p = self.make_plot(name) |
540 | 556 | ||
541 | p.title = scenario_heading(conf, True) | 557 | p.title = scenario_heading(conf, True) |
542 | 558 | ||
543 | if 'sched' in conf: | 559 | if 'sched' in conf: |
544 | p.curves += [curve(fname=tmpfile, xcol=2, ycol=(y + 3), title=t) | ||
545 | for (y, t) in enumerate(titles)] | ||
546 | p.ylabel = "ratio of schedulable task sets" | 560 | p.ylabel = "ratio of schedulable task sets" |
547 | p.xlabel = "task set utilization cap (prior to overhead accounting)" | 561 | p.xlabel = "task set utilization cap (prior to overhead accounting)" |
548 | p.xticks = (0, 1) | 562 | p.xticks = (0, 1) |
549 | p.xrange = (0.95, 24.05) | 563 | p.xrange = (0.95, 24.05) |
550 | p.title += "; %skB WSS" % conf['key'] | 564 | p.title += "; %skB WSS" % conf['key'] |
565 | xcol = 2 | ||
551 | elif 'wsched' in conf: | 566 | elif 'wsched' in conf: |
552 | p.curves += [curve(fname=tmpfile, xcol=1, ycol=(y + 3), title=t) | 567 | xcol = 1 |
553 | for (y, t) in enumerate(titles)] | ||
554 | p.xlabel = "working set size (WSS)" | 568 | p.xlabel = "working set size (WSS)" |
555 | p.ylabel = "weighted schedulability" | 569 | p.ylabel = "weighted schedulability" |
556 | p.xticks = (0, 64) | 570 | p.xticks = (0, 64) |
557 | else: | 571 | else: |
558 | self.err("What kind of semipart experiment is this?") | 572 | self.err("What kind of semipart experiment is this?") |
559 | 573 | ||
574 | p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t) | ||
575 | for (t, idx) in titles] | ||
576 | |||
577 | p.yrange = (-0.05, 1.05) | ||
578 | p.yticks = (0, 0.1) | ||
560 | 579 | ||
561 | #### Styling. | 580 | #### Styling. |
562 | 581 | ||
@@ -567,9 +586,9 @@ class SchedPlotter(defapp.App): | |||
567 | p.font_size = '10' | 586 | p.font_size = '10' |
568 | p.size = ('20cm', '10cm') | 587 | p.size = ('20cm', '10cm') |
569 | p.monochrome = False | 588 | p.monochrome = False |
570 | p.dashed_lines = True | 589 | p.dashed_lines = False |
571 | p.key = 'below' | 590 | p.key = 'below' |
572 | p.default_style = 'lines lw 6' | 591 | p.default_style = 'linespoints lw 1' |
573 | 592 | ||
574 | if self.options.smooth: | 593 | if self.options.smooth: |
575 | p.default_style += " smooth bezier" | 594 | p.default_style += " smooth bezier" |