aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xplot_rtas12.py47
-rwxr-xr-xplot_rtas12_betaexp.py31
2 files changed, 62 insertions, 16 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
195def 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
187def plot_sched(opts, data_dir, ycol, title, fname): 213def 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
216if __name__ == '__main__': 243if __name__ == '__main__':
217 main() 244 main()
diff --git a/plot_rtas12_betaexp.py b/plot_rtas12_betaexp.py
index 2153222..88be801 100755
--- a/plot_rtas12_betaexp.py
+++ b/plot_rtas12_betaexp.py
@@ -49,10 +49,15 @@ def set_plot_opts(opts, p):
49 if opts.paper: 49 if opts.paper:
50 ext = 'pdf' 50 ext = 'pdf'
51 p.size = ('8.5cm', '5.25cm') 51 p.size = ('8.5cm', '5.25cm')
52 line_width = 1.5
53 point_size = 0.3
52 p.font_size = '5pt' 54 p.font_size = '5pt'
53 else: 55 else:
54 ext = 'png' 56 ext = 'png'
55 p.size = (1024, 768) 57 p.size = (1024, 768)
58 line_width = 3.0
59 point_size = 1.5
60 p.font_size = 'font "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf" 18'
56 p.output = '{0}.{1}'.format(p.output, ext) 61 p.output = '{0}.{1}'.format(p.output, ext)
57 p.format = ext 62 p.format = ext
58 p.default_style = 'linespoints lw 2.5' 63 p.default_style = 'linespoints lw 2.5'
@@ -61,15 +66,17 @@ def set_plot_opts(opts, p):
61 p.ylog = True 66 p.ylog = True
62 p.key = 'off' 67 p.key = 'off'
63 68
64 p.line_styles = [(1, "lw 1.5 ps 0.4"), 69 p.line_styles = [
65 (2, "lw 1.5 ps 0.4"), 70 (1, "lw {0} ps {1}".format(line_width, point_size)),
66 (3, "lw 1.5 ps 0.4"), 71 (2, "lw {0} ps {1}".format(line_width, point_size)),
67 (4, "lw 1.5 ps 0.4")] 72 (3, "lw {0} ps {1}".format(line_width, point_size)),
73 (4, "lw {0} ps {1}".format(line_width, point_size))]
74
68 for i, c in enumerate(p.curves): 75 for i, c in enumerate(p.curves):
69 c.style = "linespoints ls %d" % (i + 1) 76 c.style = "linespoints ls %d" % (i + 1)
70 77
71 78
72def plot_metric(opts, dat_dir, metric, coin_prob, xr=None): 79def plot_metric(opts, dat_dir, metric, coin_prob, xr=None, for_jim=False):
73 """Plot metric for each level, enforcement pair at the specified 80 """Plot metric for each level, enforcement pair at the specified
74 probability. 81 probability.
75 82
@@ -79,7 +86,9 @@ def plot_metric(opts, dat_dir, metric, coin_prob, xr=None):
79 p.output = '{0}/beta-exp-metric={1}-prob={2}'.format( 86 p.output = '{0}/beta-exp-metric={1}-prob={2}'.format(
80 dat_dir, metric, str(coin_prob).replace('.', '')) 87 dat_dir, metric, str(coin_prob).replace('.', ''))
81 if xr is not None: 88 if xr is not None:
82 p.output = '{0}-zoom=1'.format(p.output) 89 p.output = '{0}_zoom=1'.format(p.output)
90 if for_jim:
91 p.output = '{0}-forjim=1'.format(p.output)
83 92
84 for (level, enforcement) in [(l, e) for l in ('c', 'b') for e in (1, 0)]: 93 for (level, enforcement) in [(l, e) for l in ('c', 'b') for e in (1, 0)]:
85 fname = '{0}/beta_be={1}_prob={2}.csv'.format(dat_dir, enforcement, coin_prob) 94 fname = '{0}/beta_be={1}_prob={2}.csv'.format(dat_dir, enforcement, coin_prob)
@@ -102,6 +111,12 @@ def plot_metric(opts, dat_dir, metric, coin_prob, xr=None):
102 p.yrange = (-0.01, 1.01) 111 p.yrange = (-0.01, 1.01)
103 if (metric == 'rel-rt-mean' and coin_prob == 0.1 and xr is None): 112 if (metric == 'rel-rt-mean' and coin_prob == 0.1 and xr is None):
104 p.key = 'at 1, 100' 113 p.key = 'at 1, 100'
114
115 if for_jim:
116 p.title = 'relative response time mean, 10% abberant'
117 p.key = 'top left'
118 if xr is None:
119 p.key = 'at 1, 10'
105 p.gnuplot_exec() 120 p.gnuplot_exec()
106 121
107def main(): 122def main():
@@ -122,5 +137,9 @@ def main():
122 # not in paper 137 # not in paper
123 plot_metric(opts, data_dir, 'rel-rt-max', coin_val) 138 plot_metric(opts, data_dir, 'rel-rt-max', coin_val)
124 139
140 # for jim
141 plot_metric(opts, data_dir, 'rel-rt-mean', 0.1, for_jim=True)
142 plot_metric(opts, data_dir, 'rel-rt-mean', 0.1, xr=(0.02, 0.11), for_jim=True)
143
125if __name__ == '__main__': 144if __name__ == '__main__':
126 main() 145 main()