diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-22 17:13:31 -0500 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-22 17:14:32 -0500 |
| commit | d89e4e391acf930bf865a68f76accaa9248d401c (patch) | |
| tree | a38b956d6ea452f5eb31b3b3debb4bdc4ca7cd27 | |
| parent | 4f9c03d24514224a5f346f1d27df07a9e2d2d935 (diff) | |
tweak output
| -rwxr-xr-x | oplot.py | 19 |
1 files changed, 15 insertions, 4 deletions
| @@ -32,6 +32,9 @@ options = [ | |||
| 32 | o('-d', '--stdev', action='store_true', dest='use_std', | 32 | o('-d', '--stdev', action='store_true', dest='use_std', |
| 33 | help='use standard devation filter'), | 33 | help='use standard devation filter'), |
| 34 | 34 | ||
| 35 | o(None, '--not-per-proc', action='store_false', dest='per_proc', | ||
| 36 | help='do not show per-processor task counts'), | ||
| 37 | |||
| 35 | o('-c', '--cut-off', action='store', dest='cutoff', type='int', | 38 | o('-c', '--cut-off', action='store', dest='cutoff', type='int', |
| 36 | help='max number of samples to use'), | 39 | help='max number of samples to use'), |
| 37 | 40 | ||
| @@ -75,6 +78,7 @@ defaults = { | |||
| 75 | 78 | ||
| 76 | # formatting options | 79 | # formatting options |
| 77 | 'binsize' : 0.25, | 80 | 'binsize' : 0.25, |
| 81 | 'per_proc' : True, | ||
| 78 | 82 | ||
| 79 | 'xmax' : None, | 83 | 'xmax' : None, |
| 80 | 'ymax' : None, | 84 | 'ymax' : None, |
| @@ -83,7 +87,7 @@ defaults = { | |||
| 83 | 87 | ||
| 84 | 88 | ||
| 85 | TXT = { | 89 | TXT = { |
| 86 | 'RELEASE-LATENCY' : 'timer latency', | 90 | 'RELEASE-LATENCY' : 'timer interrupt latency', |
| 87 | 'RELEASE' : 'job release overhead', | 91 | 'RELEASE' : 'job release overhead', |
| 88 | 'SCHED' : 'scheduling overhead', | 92 | 'SCHED' : 'scheduling overhead', |
| 89 | 'SCHED2' : 'post-scheduling overhead', | 93 | 'SCHED2' : 'post-scheduling overhead', |
| @@ -286,7 +290,8 @@ class OverheadPlotter(defapp.App): | |||
| 286 | 290 | ||
| 287 | def prepare_trends(self, datafile, name, conf): | 291 | def prepare_trends(self, datafile, name, conf): |
| 288 | data = load_csv_file(datafile) | 292 | data = load_csv_file(datafile) |
| 289 | if 'host' in conf and conf['host'] in HOST_CPUS: | 293 | if not self.options.per_proc and \ |
| 294 | 'host' in conf and conf['host'] in HOST_CPUS: | ||
| 290 | cpus = HOST_CPUS[conf['host']] | 295 | cpus = HOST_CPUS[conf['host']] |
| 291 | if conf['scheduler'].endswith('-RM'): | 296 | if conf['scheduler'].endswith('-RM'): |
| 292 | cpus -= 1 | 297 | cpus -= 1 |
| @@ -317,10 +322,17 @@ class OverheadPlotter(defapp.App): | |||
| 317 | % (TXT[conf['overhead']], conf['scheduler']) | 322 | % (TXT[conf['overhead']], conf['scheduler']) |
| 318 | 323 | ||
| 319 | p.ylabel = "overhead in microseconds" | 324 | p.ylabel = "overhead in microseconds" |
| 320 | p.xlabel = "number of tasks" | 325 | if self.options.per_proc: |
| 326 | p.xlabel = "number of tasks per processor" | ||
| 327 | else: | ||
| 328 | p.xlabel = "number of tasks" | ||
| 321 | 329 | ||
| 330 | p.xticks = (0, max(cpus, 10)) | ||
| 322 | if self.options.xmax: | 331 | if self.options.xmax: |
| 323 | p.xrange = (0, self.options.xmax) | 332 | p.xrange = (0, self.options.xmax) |
| 333 | elif self.options.per_proc: | ||
| 334 | p.xrange = (0.5, 20.5) | ||
| 335 | p.xticks = (0, 1) | ||
| 324 | else: | 336 | else: |
| 325 | p.xrange = (0, ceil(cpus * 20 / 100.0) * 100) | 337 | p.xrange = (0, ceil(cpus * 20 / 100.0) * 100) |
| 326 | 338 | ||
| @@ -329,7 +341,6 @@ class OverheadPlotter(defapp.App): | |||
| 329 | else: | 341 | else: |
| 330 | p.yrange = (0, (ceil(max_y / 50.0)) * 50) | 342 | p.yrange = (0, (ceil(max_y / 50.0)) * 50) |
| 331 | 343 | ||
| 332 | p.xticks = (0, max(cpus, 10)) | ||
| 333 | p.curves = [curve(fname, xcol=1, ycol=2, title="maximum"), | 344 | p.curves = [curve(fname, xcol=1, ycol=2, title="maximum"), |
| 334 | curve(fname, xcol=1, ycol=3, style="lines", title='average'), | 345 | curve(fname, xcol=1, ycol=3, style="lines", title='average'), |
| 335 | curve(fname, xcol=1, ycol=3, error=4, title="std. deviation")] | 346 | curve(fname, xcol=1, ycol=3, error=4, title="std. deviation")] |
