diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-05-14 16:09:53 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-05-14 16:09:53 -0400 |
| commit | dcf56edd1b4ea14c73bc4558a4465623e20c478f (patch) | |
| tree | 7233e7b1e5d37f1318678792170bb2d195c5a865 | |
| parent | b45afe309c61d9590ba523a5f0c37469fcdc4553 (diff) | |
add split graph plotting
| -rwxr-xr-x | plot.py | 46 |
1 files changed, 45 insertions, 1 deletions
| @@ -10,6 +10,7 @@ options = [ | |||
| 10 | o('-f', '--format', action='store', dest='format', type='choice', | 10 | o('-f', '--format', action='store', dest='format', type='choice', |
| 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, '--split', action='store_true', dest='split'), | ||
| 13 | ] | 14 | ] |
| 14 | 15 | ||
| 15 | defaults = { | 16 | defaults = { |
| @@ -22,6 +23,7 @@ defaults = { | |||
| 22 | 'xlabel' : 'task set utilization cap (prior to inflation)', | 23 | 'xlabel' : 'task set utilization cap (prior to inflation)', |
| 23 | 'ylabel' : 'ratio of schedulable task sets', | 24 | 'ylabel' : 'ratio of schedulable task sets', |
| 24 | 'paper' : False, | 25 | 'paper' : False, |
| 26 | 'split' : False, | ||
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | def decode(name): | 29 | def decode(name): |
| @@ -197,6 +199,45 @@ class SchedPlotter(defapp.App): | |||
| 197 | else: | 199 | else: |
| 198 | self.plot(graphs, title, name, conf) | 200 | self.plot(graphs, title, name, conf) |
| 199 | 201 | ||
| 202 | def plot_rtss09_split(self, tmpfile, name, conf): | ||
| 203 | title = scenario_heading(conf, want_period=True) | ||
| 204 | ideal = (tmpfile, 1, 2, 'ideal') | ||
| 205 | |||
| 206 | subgraphs = [ | ||
| 207 | # dedicated vs. non-dedicated | ||
| 208 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 4, 'SE1')], | ||
| 209 | [(tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1')], | ||
| 210 | [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 9, 'SQ1')], | ||
| 211 | |||
| 212 | # fine-grained vs. sequential | ||
| 213 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 5, 'FEm')], | ||
| 214 | [(tmpfile, 1, 4, 'SE1'), (tmpfile, 1, 6, 'FE1')], | ||
| 215 | |||
| 216 | # hierarchical vs. sequential | ||
| 217 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 7, 'HEm')], | ||
| 218 | |||
| 219 | # quantum vs. event | ||
| 220 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 8, 'SQm')], | ||
| 221 | [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'SQ1')], | ||
| 222 | ] | ||
| 223 | staggered = [ | ||
| 224 | # dedicated vs. non-dedicated | ||
| 225 | [(tmpfile, 1, 10, 'S-SQm'), (tmpfile, 1, 11, 'S-SQ1')], | ||
| 226 | |||
| 227 | # staggered vs. non-staggered | ||
| 228 | [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 10, 'S-SQm')], | ||
| 229 | [(tmpfile, 1, 9, 'SQ1'), (tmpfile, 1, 11, 'S-SQ1')], | ||
| 230 | ] | ||
| 231 | if 'hard' in conf: | ||
| 232 | subgraphs += staggered | ||
| 233 | for g in subgraphs: | ||
| 234 | graphs = [ideal] + g | ||
| 235 | xname = name + '_' + '-vs-'.join([x[3] for x in g]) | ||
| 236 | if self.options.paper and self.options.format == 'pdf': | ||
| 237 | self.plot_paper(graphs, title, xname, conf) | ||
| 238 | else: | ||
| 239 | self.plot(graphs, title, xname, conf) | ||
| 240 | |||
| 200 | def plot_file(self, datafile): | 241 | def plot_file(self, datafile): |
| 201 | bname = basename(datafile) | 242 | bname = basename(datafile) |
| 202 | name, ext = splitext(bname) | 243 | name, ext = splitext(bname) |
| @@ -217,7 +258,10 @@ class SchedPlotter(defapp.App): | |||
| 217 | elif 'irq' in conf: | 258 | elif 'irq' in conf: |
| 218 | self.plot_irq(tmpfile.name, name, conf) | 259 | self.plot_irq(tmpfile.name, name, conf) |
| 219 | elif 'rtss09' in conf: | 260 | elif 'rtss09' in conf: |
| 220 | self.plot_rtss09(tmpfile.name, name, conf) | 261 | if self.options.split: |
| 262 | self.plot_rtss09_split(tmpfile.name, name, conf) | ||
| 263 | else: | ||
| 264 | self.plot_rtss09(tmpfile.name, name, conf) | ||
| 221 | else: | 265 | else: |
| 222 | self.err("Skipped '%s'; unkown experiment type." | 266 | self.err("Skipped '%s'; unkown experiment type." |
| 223 | % bname) | 267 | % bname) |
