diff options
Diffstat (limited to 'plot_rtas12.py')
-rwxr-xr-x | plot_rtas12.py | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/plot_rtas12.py b/plot_rtas12.py index 5cbcabd..d5e9ed9 100755 --- a/plot_rtas12.py +++ b/plot_rtas12.py | |||
@@ -76,28 +76,36 @@ def set_plot_opts(opts, p): | |||
76 | if opts.paper: | 76 | if opts.paper: |
77 | ext = 'pdf' | 77 | ext = 'pdf' |
78 | p.size = ('8.5cm', '5.25cm') | 78 | p.size = ('8.5cm', '5.25cm') |
79 | line_width = 1.5 | ||
80 | point_size = 0.3 | ||
79 | p.font_size = '5pt' | 81 | p.font_size = '5pt' |
80 | else: | 82 | else: |
81 | ext = 'png' | 83 | ext = 'png' |
82 | p.size = (1024, 768) | 84 | p.size = (1024, 768) |
85 | line_width = 3.0 | ||
86 | point_size = 1.5 | ||
87 | p.font_size = 'font "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf" 18' | ||
83 | p.output = '{0}.{1}'.format(p.output, ext) | 88 | p.output = '{0}.{1}'.format(p.output, ext) |
84 | p.format = ext | 89 | p.format = ext |
85 | 90 | ||
86 | for i, c in enumerate(p.curves): | 91 | for i, c in enumerate(p.curves): |
87 | c.style = "linespoints ls %d" % (i + 1) | 92 | c.style = "linespoints ls %d" % (i + 1) |
88 | 93 | ||
89 | # don't use yellow | 94 | try: |
90 | p.curves[5].style = "linespoints ls 7" | 95 | # don't use yellow if we have this curve |
96 | p.curves[5].style = "linespoints ls 7" | ||
97 | except IndexError: | ||
98 | pass | ||
91 | 99 | ||
92 | p.line_styles = [ | 100 | p.line_styles = [ |
93 | (1, "lw 1.5 ps 0.3"), | 101 | (1, "lw {0} ps {1}".format(line_width, point_size)), |
94 | (2, "lw 1.5 ps 0.3"), | 102 | (2, "lw {0} ps {1}".format(line_width, point_size)), |
95 | (3, "lw 1.5 ps 0.3"), | 103 | (3, "lw {0} ps {1}".format(line_width, point_size)), |
96 | (4, "lw 1.5 ps 0.3"), | 104 | (4, "lw {0} ps {1}".format(line_width, point_size)), |
97 | (5, 'pt 6 lw 1.5 ps 0.3 lc rgbcolor "#ff910d"'), | 105 | (5, 'pt 6 lw {0} ps {1} lc rgbcolor "#ff910d"'.format(line_width, point_size)), |
98 | (6, "pt 7 lw 1.5 ps 0.3"), | 106 | (6, "pt 7 lw {0} ps {1}".format(line_width, point_size)), |
99 | (7, 'lw 1.5 ps 0.3 lc rgbcolor "#000000"'), | 107 | (7, 'lw {0} ps {1} lc rgbcolor "#000000"'.format(line_width, point_size)), |
100 | (8, "lw 1.5 ps 0.3"), | 108 | (8, "lw {0} ps {1}".format(line_width, point_size)), |
101 | ] | 109 | ] |
102 | 110 | ||
103 | 111 | ||
@@ -184,6 +192,24 @@ def plot_release(opts, data_dir, ycol, title, fname): | |||
184 | p.key = 'top left' | 192 | p.key = 'top left' |
185 | p.gnuplot_exec() | 193 | p.gnuplot_exec() |
186 | 194 | ||
195 | def plot_release_jim(opts, data_dir, ycol, title, fname): | ||
196 | """Jim just wanted level-A without any techniques and with all our techniques.""" | ||
197 | p = Plot() | ||
198 | p.output = '{0}/{1}'.format(data_dir, fname) | ||
199 | refs = [] # need to save reference to file handle so it is not deleted | ||
200 | |||
201 | for sched in ['MC', 'MC-MERGE-REDIR']: | ||
202 | o_type = 'LVLA-RELEASE' | ||
203 | fname = '{0}/scheduler={1}_overhead={2}.csv'.format(data_dir, sched, o_type) | ||
204 | ti = '{0} {1}'.format(get_sched_title(sched), get_overhead_title(o_type)) | ||
205 | p.curves += [curve(fname=fname, xcol=gnuplot_col('n_tasks'), ycol=ycol, title=ti)] | ||
206 | p.xlabel = 'number of tasks' | ||
207 | p.ylabel = 'overhead (microseconds)' | ||
208 | set_plot_opts(opts, p) | ||
209 | p.key = 'top left' | ||
210 | p.title = 'level-A worst-case release overhead' | ||
211 | p.gnuplot_exec() | ||
212 | |||
187 | def plot_sched(opts, data_dir, ycol, title, fname): | 213 | def plot_sched(opts, data_dir, ycol, title, fname): |
188 | p = Plot() | 214 | p = Plot() |
189 | p.output = '{0}/{1}'.format(data_dir, fname) | 215 | p.output = '{0}/{1}'.format(data_dir, fname) |
@@ -212,6 +238,7 @@ def main(): | |||
212 | plot_release(opts, data_dir, gnuplot_col('max'), 'worst-case release overhead', 'overhead=RELEASE_type=MAX') | 238 | plot_release(opts, data_dir, gnuplot_col('max'), 'worst-case release overhead', 'overhead=RELEASE_type=MAX') |
213 | plot_sched(opts, data_dir, gnuplot_col('avg'), 'average-case scheduling overhead', 'overhead=SCHED_type=AVG') | 239 | plot_sched(opts, data_dir, gnuplot_col('avg'), 'average-case scheduling overhead', 'overhead=SCHED_type=AVG') |
214 | plot_release(opts, data_dir, gnuplot_col('avg'), 'average-case release overhead', 'overhead=RELEASE_type=AVG') | 240 | plot_release(opts, data_dir, gnuplot_col('avg'), 'average-case release overhead', 'overhead=RELEASE_type=AVG') |
241 | plot_release_jim(opts, data_dir, gnuplot_col('max'), 'worst-case release overhead', 'overhead=RELEASE_type=MAX_for-jim=1') | ||
215 | 242 | ||
216 | if __name__ == '__main__': | 243 | if __name__ == '__main__': |
217 | main() | 244 | main() |