diff options
-rw-r--r-- | util/stats/info.py | 3 | ||||
-rwxr-xr-x | util/stats/stats.py | 24 |
2 files changed, 23 insertions, 4 deletions
diff --git a/util/stats/info.py b/util/stats/info.py index a94563cf9..15a4a7d73 100644 --- a/util/stats/info.py +++ b/util/stats/info.py @@ -152,9 +152,8 @@ class Statistic(object): def __setattr__(self, attr, value): if attr == 'bins' or attr == 'ticks': if attr == 'bins': - global db if value is not None: - value = db.getBin(value) + value = source.getBin(value) elif attr == 'samples' and type(value) is str: value = [ int(x) for x in value.split() ] diff --git a/util/stats/stats.py b/util/stats/stats.py index 37bb1d70b..233eab521 100755 --- a/util/stats/stats.py +++ b/util/stats/stats.py @@ -43,7 +43,7 @@ def graphdata(runs, tag, label, value): import info configs = ['stx', 'ste', 'hte', 'htd', 'ocm', 'occ', 'ocp' ] benchmarks = [ 'm', 's' ] - dmas = [ 'X', 'D' ] + dmas = [ 'x', 'd', 'b' ] caches = [ '2', '4' ] checkpoints = [ '1' ] @@ -56,7 +56,7 @@ def graphdata(runs, tag, label, value): for bench,dma,cache,cpt in names: base = '%s.%s.%s.%s' % (bench, dma, cache, cpt) - fname = '/n/ziff/z/binkertn/graph/test2/data/%s.%s.dat' % (tag, base) + fname = 'data/%s.%s.dat' % (tag, base) f = open(fname, 'w') print >>f, '#set TITLE = %s' % base print >>f, '#set xlbl = Configuration' @@ -178,6 +178,26 @@ def commands(options, command, args): if options.graph: graphdata(runs, stat.name, stat.name, stat) else: + if options.binned: + print 'kernel ticks' + stat.bins = 'kernel' + printdata(runs, stat) + + print 'idle ticks' + stat.bins = 'idle' + printdata(runs, stat) + + print 'user ticks' + stat.bins = 'user' + printdata(runs, stat) + + print 'interrupt ticks' + stat.bins = 'user' + printdata(runs, stat) + + print 'total ticks' + + stat.bins = None print stat.name printdata(runs, stat) return |