From d89e4e391acf930bf865a68f76accaa9248d401c Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Tue, 22 Feb 2011 17:13:31 -0500 Subject: tweak output --- oplot.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'oplot.py') diff --git a/oplot.py b/oplot.py index 8d96fd1..0212376 100755 --- a/oplot.py +++ b/oplot.py @@ -32,6 +32,9 @@ options = [ o('-d', '--stdev', action='store_true', dest='use_std', help='use standard devation filter'), + o(None, '--not-per-proc', action='store_false', dest='per_proc', + help='do not show per-processor task counts'), + o('-c', '--cut-off', action='store', dest='cutoff', type='int', help='max number of samples to use'), @@ -75,6 +78,7 @@ defaults = { # formatting options 'binsize' : 0.25, + 'per_proc' : True, 'xmax' : None, 'ymax' : None, @@ -83,7 +87,7 @@ defaults = { TXT = { - 'RELEASE-LATENCY' : 'timer latency', + 'RELEASE-LATENCY' : 'timer interrupt latency', 'RELEASE' : 'job release overhead', 'SCHED' : 'scheduling overhead', 'SCHED2' : 'post-scheduling overhead', @@ -286,7 +290,8 @@ class OverheadPlotter(defapp.App): def prepare_trends(self, datafile, name, conf): data = load_csv_file(datafile) - if 'host' in conf and conf['host'] in HOST_CPUS: + if not self.options.per_proc and \ + 'host' in conf and conf['host'] in HOST_CPUS: cpus = HOST_CPUS[conf['host']] if conf['scheduler'].endswith('-RM'): cpus -= 1 @@ -317,10 +322,17 @@ class OverheadPlotter(defapp.App): % (TXT[conf['overhead']], conf['scheduler']) p.ylabel = "overhead in microseconds" - p.xlabel = "number of tasks" + if self.options.per_proc: + p.xlabel = "number of tasks per processor" + else: + p.xlabel = "number of tasks" + p.xticks = (0, max(cpus, 10)) if self.options.xmax: p.xrange = (0, self.options.xmax) + elif self.options.per_proc: + p.xrange = (0.5, 20.5) + p.xticks = (0, 1) else: p.xrange = (0, ceil(cpus * 20 / 100.0) * 100) @@ -329,7 +341,6 @@ class OverheadPlotter(defapp.App): else: p.yrange = (0, (ceil(max_y / 50.0)) * 50) - p.xticks = (0, max(cpus, 10)) p.curves = [curve(fname, xcol=1, ycol=2, title="maximum"), curve(fname, xcol=1, ycol=3, style="lines", title='average'), curve(fname, xcol=1, ycol=3, error=4, title="std. deviation")] -- cgit v1.2.2