diff options
Diffstat (limited to 'plot.py')
-rwxr-xr-x | plot.py | 31 |
1 files changed, 28 insertions, 3 deletions
@@ -11,6 +11,7 @@ options = [ | |||
11 | choices=FORMATS, help='output format'), | 11 | choices=FORMATS, help='output format'), |
12 | o(None, '--paper', action='store_true', dest='paper'), | 12 | o(None, '--paper', action='store_true', dest='paper'), |
13 | o(None, '--wide', action='store_true', dest='wide'), | 13 | o(None, '--wide', action='store_true', dest='wide'), |
14 | o(None, '--column', action='store_true', dest='column'), | ||
14 | o(None, '--split', action='store_true', dest='split'), | 15 | o(None, '--split', action='store_true', dest='split'), |
15 | ] | 16 | ] |
16 | 17 | ||
@@ -26,6 +27,7 @@ defaults = { | |||
26 | 'paper' : False, | 27 | 'paper' : False, |
27 | 'split' : False, | 28 | 'split' : False, |
28 | 'wide' : False, | 29 | 'wide' : False, |
30 | 'column' : False, | ||
29 | } | 31 | } |
30 | 32 | ||
31 | def decode(name): | 33 | def decode(name): |
@@ -117,6 +119,27 @@ class SchedPlotter(defapp.App): | |||
117 | term_opts=tops, | 119 | term_opts=tops, |
118 | **xtra) | 120 | **xtra) |
119 | 121 | ||
122 | # width = 3.4in | ||
123 | # height = 2.0in | ||
124 | |||
125 | def plot_column(self, graphs, title, name, conf, **xtra): | ||
126 | scale = 1.0 | ||
127 | tops = 'color solid font "Helvetica,8" linewidth 1.0 ' \ | ||
128 | 'rounded size %.1fin,%.1fin' % (scale * 7.0, scale * 2.0) | ||
129 | gnuplot(graphs, title=title, | ||
130 | xlabel=self.options.xlabel, | ||
131 | ylabel=self.options.ylabel + | ||
132 | (' [soft]' if 'soft' in conf else ' [hard]'), | ||
133 | xrange=self.options.xrange, | ||
134 | yrange=self.options.yrange, | ||
135 | xticks=self.options.xticks, | ||
136 | yticks=self.options.yticks, | ||
137 | format=self.options.format, | ||
138 | fname=name, | ||
139 | key='right bottom' if '250' in conf else 'right top', | ||
140 | term_opts=tops) | ||
141 | |||
142 | |||
120 | def plot_paper(self, graphs, title, name, conf, **xtra): | 143 | def plot_paper(self, graphs, title, name, conf, **xtra): |
121 | tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' | 144 | tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' |
122 | gnuplot(graphs, title=title, | 145 | gnuplot(graphs, title=title, |
@@ -283,9 +306,9 @@ class SchedPlotter(defapp.App): | |||
283 | (tmpfile, 1, 9, 'P-EDF'), | 306 | (tmpfile, 1, 9, 'P-EDF'), |
284 | ] | 307 | ] |
285 | 308 | ||
286 | self.options.xrange = (-5, 1005) | 309 | self.options.xrange = (-5, 5005) |
287 | self.options.xticks = (0, 50) | 310 | self.options.xticks = (0, 250) |
288 | self.options.xlabel = "preemption/migration overhead (in us)" | 311 | self.options.xlabel = "cache-related preemption/migration delay (in us)" |
289 | for (tag, gs) in [('cumulative', graphs), ('weighted', graphs_w)]: | 312 | for (tag, gs) in [('cumulative', graphs), ('weighted', graphs_w)]: |
290 | xname = name + '_' + tag | 313 | xname = name + '_' + tag |
291 | self.options.ylabel = tag + ' schedulability' | 314 | self.options.ylabel = tag + ' schedulability' |
@@ -293,6 +316,8 @@ class SchedPlotter(defapp.App): | |||
293 | self.plot_paper(gs, title, xname, conf) | 316 | self.plot_paper(gs, title, xname, conf) |
294 | elif self.options.wide and self.options.format == 'pdf': | 317 | elif self.options.wide and self.options.format == 'pdf': |
295 | self.plot_wide(gs, title, xname, conf) | 318 | self.plot_wide(gs, title, xname, conf) |
319 | elif self.options.column and self.options.format == 'pdf': | ||
320 | self.plot_column(gs, title, xname, conf) | ||
296 | else: | 321 | else: |
297 | self.plot(gs, title, xname, conf) | 322 | self.plot(gs, title, xname, conf) |
298 | 323 | ||