diff options
Diffstat (limited to 'plot.py')
-rwxr-xr-x | plot.py | 74 |
1 files changed, 63 insertions, 11 deletions
@@ -525,33 +525,58 @@ class SchedPlotter(defapp.App): | |||
525 | 525 | ||
526 | npsf_titles = [ | 526 | npsf_titles = [ |
527 | ('NPS-F (load, delta=1)', 7), | 527 | ('NPS-F (load, delta=1)', 7), |
528 | ('NPS-F (load, delta=4)', 8), | ||
529 | ('NPS-F (idle, delta=1)', 9), | 528 | ('NPS-F (idle, delta=1)', 9), |
529 | ('NPS-F (load, delta=4)', 8), | ||
530 | ('NPS-F (idle, delta=4)', 10), | 530 | ('NPS-F (idle, delta=4)', 10), |
531 | ] | 531 | ] |
532 | 532 | ||
533 | cnpsf_titles = [ | 533 | cnpsf_titles = [ |
534 | ('C-NPS-F (load, delta=1)', 11), | 534 | ('C-NPS-F (load, delta=1)', 11), |
535 | ('C-NPS-F (load, delta=4)', 12), | ||
536 | ('C-NPS-F (idle, delta=1)', 13), | 535 | ('C-NPS-F (idle, delta=1)', 13), |
536 | ('C-NPS-F (load, delta=4)', 12), | ||
537 | ('C-NPS-F (idle, delta=4)', 14), | 537 | ('C-NPS-F (idle, delta=4)', 14), |
538 | ] | 538 | ] |
539 | 539 | ||
540 | npsf_comp = [ | ||
541 | ('NPS-F (idle, delta=1)', 9), | ||
542 | ('NPS-F (idle, delta=4)', 10), | ||
543 | ('NPS-F (load, delta=1)', 7), | ||
544 | ('C-NPS-F (idle, delta=1)', 13), | ||
545 | ('C-NPS-F (idle, delta=4)', 14), | ||
546 | ('NPS-F (load, delta=4)', 8), | ||
547 | ('C-NPS-F (load, delta=1)', 11), | ||
548 | ('C-NPS-F (load, delta=4)', 12), | ||
549 | ] | ||
550 | |||
551 | |||
540 | edffm_titles = [ | 552 | edffm_titles = [ |
541 | ('EDF-fm (load)', 15), | 553 | ('EDF-fm (load)', 15), |
542 | ('EDF-fm (idle)', 16), | 554 | ('EDF-fm (idle)', 16), |
543 | ] | 555 | ] |
544 | 556 | ||
557 | npsf_paper = [ | ||
558 | ('NPS-F (idle, delta=1)', 9), | ||
559 | ('NPS-F (load, delta=1)', 7), | ||
560 | ] | ||
561 | |||
562 | paper_titles = cedf_titles + edfwm_titles + npsf_paper | ||
545 | 563 | ||
546 | if self.options.alternate: | 564 | if self.options.alternate: |
547 | # NPS-F comparison | 565 | # NPS-F comparison |
548 | titles = npsf_titles + cnpsf_titles | 566 | titles = npsf_comp |
549 | else: | 567 | else: |
550 | # all | 568 | # all |
551 | titles = cedf_titles + edfwm_titles + npsf_titles + cnpsf_titles | 569 | if self.options.paper: |
570 | titles = paper_titles | ||
571 | else: | ||
572 | titles = cedf_titles + edfwm_titles + npsf_titles + cnpsf_titles | ||
552 | if 'soft' in conf: | 573 | if 'soft' in conf: |
553 | titles += edffm_titles | 574 | titles += edffm_titles |
554 | 575 | ||
576 | if self.options.slides: | ||
577 | # remove all idle configurations | ||
578 | titles = [t for i, t in enumerate(titles) if i % 2 == 0] | ||
579 | |||
555 | p = self.make_plot(name) | 580 | p = self.make_plot(name) |
556 | 581 | ||
557 | p.title = scenario_heading(conf, True) | 582 | p.title = scenario_heading(conf, True) |
@@ -561,15 +586,20 @@ class SchedPlotter(defapp.App): | |||
561 | p.xlabel = "task set utilization cap (prior to overhead accounting)" | 586 | p.xlabel = "task set utilization cap (prior to overhead accounting)" |
562 | p.xticks = (0, 1) | 587 | p.xticks = (0, 1) |
563 | p.xrange = (0.95, 24.05) | 588 | p.xrange = (0.95, 24.05) |
564 | p.title += "; %skB WSS" % conf['key'] | 589 | p.title += "; WSS = %skB" % conf['key'] |
565 | xcol = 2 | 590 | xcol = 2 |
566 | elif 'wsched' in conf: | 591 | elif 'wsched' in conf: |
567 | xcol = 1 | 592 | xcol = 1 |
568 | p.xlabel = "working set size (WSS)" | 593 | p.xlabel = "working set size (WSS)" |
569 | p.ylabel = "weighted schedulability" | 594 | p.ylabel = "weighted schedulability" |
570 | p.xticks = (0, 64) | 595 | p.xticks = (0, 64) |
596 | p.xrange = (-1, 1025) | ||
597 | if self.options.alternate: | ||
598 | p.xrange = (-1, 257) | ||
599 | p.xticks = (0, 32) | ||
571 | else: | 600 | else: |
572 | self.err("What kind of semipart experiment is this?") | 601 | self.err("What kind of semipart experiment is this?") |
602 | return | ||
573 | 603 | ||
574 | p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t) | 604 | p.curves += [curve(fname=tmpfile, xcol=xcol, ycol=idx, title=t) |
575 | for (t, idx) in titles] | 605 | for (t, idx) in titles] |
@@ -583,12 +613,34 @@ class SchedPlotter(defapp.App): | |||
583 | p.rounded_caps = True | 613 | p.rounded_caps = True |
584 | p.font = 'Helvetica' | 614 | p.font = 'Helvetica' |
585 | 615 | ||
586 | p.font_size = '10' | 616 | |
587 | p.size = ('20cm', '10cm') | 617 | if self.options.paper: |
588 | p.monochrome = False | 618 | p.default_style = 'lines lw 2.5' |
589 | p.dashed_lines = False | 619 | p.font_size = '5pt' |
590 | p.key = 'below' | 620 | p.size = ('8.5cm', '5.25cm') |
591 | p.default_style = 'linespoints lw 1' | 621 | p.monochrome = False |
622 | p.dashed_lines = False | ||
623 | if not self.options.alternate: | ||
624 | p.key ='below' | ||
625 | p.size = ('14.5cm', '4cm') | ||
626 | p.yticks = (0, 0.2) | ||
627 | |||
628 | # p.key = 'below' | ||
629 | p.default_style = 'linespoints lw 2.5' | ||
630 | elif self.options.slides: | ||
631 | p.dashed_lines = False | ||
632 | p.monochrome = False | ||
633 | p.rounded_caps = True | ||
634 | p.default_style = 'lines lw 10' | ||
635 | p.key = 'below' | ||
636 | p.xlabel = "task set utilization cap (prior to overhead accounting)" | ||
637 | else: | ||
638 | p.font_size = '10' | ||
639 | p.size = ('20cm', '10cm') | ||
640 | p.monochrome = False | ||
641 | p.dashed_lines = False | ||
642 | p.key = 'below' | ||
643 | p.default_style = 'linespoints lw 1' | ||
592 | 644 | ||
593 | if self.options.smooth: | 645 | if self.options.smooth: |
594 | p.default_style += " smooth bezier" | 646 | p.default_style += " smooth bezier" |