Fix more of the stats python stuff
util/stats/info.py: Make the binnings stuff work again. util/stats/stats.py: small patch for graphing make it so we can print out bins for the stat command --HG-- extra : convert_revision : c0279ac7030fd5146dd00801baa41e7baf97d1f4
This commit is contained in:
parent
ed1ff7fca9
commit
10e88b43fd
2 changed files with 23 additions and 4 deletions
|
@ -152,9 +152,8 @@ class Statistic(object):
|
||||||
def __setattr__(self, attr, value):
|
def __setattr__(self, attr, value):
|
||||||
if attr == 'bins' or attr == 'ticks':
|
if attr == 'bins' or attr == 'ticks':
|
||||||
if attr == 'bins':
|
if attr == 'bins':
|
||||||
global db
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
value = db.getBin(value)
|
value = source.getBin(value)
|
||||||
elif attr == 'samples' and type(value) is str:
|
elif attr == 'samples' and type(value) is str:
|
||||||
value = [ int(x) for x in value.split() ]
|
value = [ int(x) for x in value.split() ]
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ def graphdata(runs, tag, label, value):
|
||||||
import info
|
import info
|
||||||
configs = ['stx', 'ste', 'hte', 'htd', 'ocm', 'occ', 'ocp' ]
|
configs = ['stx', 'ste', 'hte', 'htd', 'ocm', 'occ', 'ocp' ]
|
||||||
benchmarks = [ 'm', 's' ]
|
benchmarks = [ 'm', 's' ]
|
||||||
dmas = [ 'X', 'D' ]
|
dmas = [ 'x', 'd', 'b' ]
|
||||||
caches = [ '2', '4' ]
|
caches = [ '2', '4' ]
|
||||||
checkpoints = [ '1' ]
|
checkpoints = [ '1' ]
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ def graphdata(runs, tag, label, value):
|
||||||
|
|
||||||
for bench,dma,cache,cpt in names:
|
for bench,dma,cache,cpt in names:
|
||||||
base = '%s.%s.%s.%s' % (bench, dma, cache, cpt)
|
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')
|
f = open(fname, 'w')
|
||||||
print >>f, '#set TITLE = %s' % base
|
print >>f, '#set TITLE = %s' % base
|
||||||
print >>f, '#set xlbl = Configuration'
|
print >>f, '#set xlbl = Configuration'
|
||||||
|
@ -178,6 +178,26 @@ def commands(options, command, args):
|
||||||
if options.graph:
|
if options.graph:
|
||||||
graphdata(runs, stat.name, stat.name, stat)
|
graphdata(runs, stat.name, stat.name, stat)
|
||||||
else:
|
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
|
print stat.name
|
||||||
printdata(runs, stat)
|
printdata(runs, stat)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue