diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-05-07 13:34:04 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-05-07 13:34:04 -0400 |
| commit | 31eda2bbea3ea0322a5753dd5cc7beadf90c6a4e (patch) | |
| tree | 3dd93fb18ff3d3e54205aca07a2fcbf9302bbedd | |
| parent | 16ae103d0a9ef2e9b0f164bdad98e8734f09df5c (diff) | |
add rtss09 plotting
| -rwxr-xr-x | plot.py | 38 |
1 files changed, 35 insertions, 3 deletions
| @@ -52,11 +52,11 @@ def get_data_tmpfile(datafile): | |||
| 52 | del d # removes temp file | 52 | del d # removes temp file |
| 53 | return None | 53 | return None |
| 54 | 54 | ||
| 55 | def scenario_heading(conf): | 55 | def scenario_heading(conf, want_period=False): |
| 56 | dist = 'unknown distribution' | 56 | dist = 'unknown distribution' |
| 57 | if 'dist' in conf: | 57 | if 'dist' in conf: |
| 58 | if conf['dist'] == 'uni': | 58 | if conf['dist'] == 'uni': |
| 59 | dist = 'uniformly distributed ' | 59 | dist = 'util. uniformly ' |
| 60 | if 'light' in conf: | 60 | if 'light' in conf: |
| 61 | dist = dist + 'in [0.001, 0.1]' | 61 | dist = dist + 'in [0.001, 0.1]' |
| 62 | elif 'medium' in conf: | 62 | elif 'medium' in conf: |
| @@ -64,13 +64,20 @@ def scenario_heading(conf): | |||
| 64 | elif 'heavy' in conf: | 64 | elif 'heavy' in conf: |
| 65 | dist = dist + 'in [0.5, 0.9]' | 65 | dist = dist + 'in [0.5, 0.9]' |
| 66 | elif conf['dist'] == 'bimo': | 66 | elif conf['dist'] == 'bimo': |
| 67 | dist = 'bimodially distributed ' | 67 | dist = 'util. bimodially ' |
| 68 | if 'light' in conf: | 68 | if 'light' in conf: |
| 69 | dist = dist + 'in [0.001, 0.5] (8/9) and [0.5, 0.9] (1/9)' | 69 | dist = dist + 'in [0.001, 0.5] (8/9) and [0.5, 0.9] (1/9)' |
| 70 | elif 'medium' in conf: | 70 | elif 'medium' in conf: |
| 71 | dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)' | 71 | dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)' |
| 72 | elif 'heavy' in conf: | 72 | elif 'heavy' in conf: |
| 73 | dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)' | 73 | dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)' |
| 74 | if want_period: | ||
| 75 | if '33' in conf: | ||
| 76 | dist += '; period uniformly in [3, 33]' | ||
| 77 | elif '250' in conf: | ||
| 78 | dist += '; period uniformly in [50, 250]' | ||
| 79 | else: | ||
| 80 | dist += '; period uniformly in [10, 100]' | ||
| 74 | return dist | 81 | return dist |
| 75 | 82 | ||
| 76 | class SchedPlotter(defapp.App): | 83 | class SchedPlotter(defapp.App): |
| @@ -167,6 +174,29 @@ class SchedPlotter(defapp.App): | |||
| 167 | title = 'Interrupt accounting under G-EDF: utilization ' + scenario_heading(conf) | 174 | title = 'Interrupt accounting under G-EDF: utilization ' + scenario_heading(conf) |
| 168 | self.plot(graphs, title, name, conf) | 175 | self.plot(graphs, title, name, conf) |
| 169 | 176 | ||
| 177 | def plot_rtss09(self, tmpfile, name, conf): | ||
| 178 | title = scenario_heading(conf, want_period=True) | ||
| 179 | graphs = [ | ||
| 180 | (tmpfile, 1, 2, 'ideal (no overheads)'), | ||
| 181 | (tmpfile, 1, 3, 'baseline'), | ||
| 182 | (tmpfile, 1, 4, 'baseline/rp'), | ||
| 183 | (tmpfile, 1, 5, 'fine-grained heap'), | ||
| 184 | (tmpfile, 1, 6, 'fine-grained heap/rp'), | ||
| 185 | (tmpfile, 1, 7, 'two-level queue'), | ||
| 186 | (tmpfile, 1, 8, 'quantum-driven'), | ||
| 187 | (tmpfile, 1, 9, 'quantum-driven/rp'), | ||
| 188 | ] | ||
| 189 | staggered = [ | ||
| 190 | (tmpfile, 1, 10, 'staggered quantum-driven'), | ||
| 191 | (tmpfile, 1, 11, 'staggered quantum-driven/rp'), | ||
| 192 | ] | ||
| 193 | if 'hard' in conf: | ||
| 194 | graphs += staggered | ||
| 195 | if self.options.paper and self.options.format == 'pdf': | ||
| 196 | self.plot_paper(graphs, title, name, conf) | ||
| 197 | else: | ||
| 198 | self.plot(graphs, title, name, conf) | ||
| 199 | |||
| 170 | def plot_file(self, datafile): | 200 | def plot_file(self, datafile): |
| 171 | bname = basename(datafile) | 201 | bname = basename(datafile) |
| 172 | name, ext = splitext(bname) | 202 | name, ext = splitext(bname) |
| @@ -186,6 +216,8 @@ class SchedPlotter(defapp.App): | |||
| 186 | self.plot_spec4(tmpfile.name, name, conf) | 216 | self.plot_spec4(tmpfile.name, name, conf) |
| 187 | elif 'irq' in conf: | 217 | elif 'irq' in conf: |
| 188 | self.plot_irq(tmpfile.name, name, conf) | 218 | self.plot_irq(tmpfile.name, name, conf) |
| 219 | elif 'rtss09' in conf: | ||
| 220 | self.plot_rtss09(tmpfile.name, name, conf) | ||
| 189 | else: | 221 | else: |
| 190 | self.err("Skipped '%s'; unkown experiment type." | 222 | self.err("Skipped '%s'; unkown experiment type." |
| 191 | % bname) | 223 | % bname) |
