add option to limit results to a set of ticks
fix ticks code to work
util/stats/info.py:
change samples -> ticks and pass all parameters
util/stats/stats.py:
add option to select a set of ticks and fix display bug
--HG--
extra : convert_revision :
eca80a8c6bb75cf82bf1624f3d0170690b2928af
if attr == 'bins':
if value is not None:
value = source.getBin(value)
- elif attr == 'samples' and type(value) is str:
+ elif attr == 'ticks' and type(value) is str:
value = [ int(x) for x in value.split() ]
self.__dict__[attr] = value
class Scalar(Statistic,FormulaStat):
def getValue(self):
- return source.data(self, self.bins)
+ return source.data(self, self.bins, self.ticks)
def display(self):
import display
if options.graph:
graphdata(runs, options, stat.name, stat.name, stat)
else:
+ if options.ticks:
+ print 'only displaying sample %s' % options.ticks
+ stat.ticks = options.ticks
+
if options.binned:
print 'kernel ticks'
stat.bins = 'kernel'
printdata(runs, stat)
print 'interrupt ticks'
- stat.bins = 'user'
+ stat.bins = 'interrupt'
printdata(runs, stat)
print 'total ticks'
printdata(runs, stat)
print 'interrupt ticks'
- stat.bins = 'user'
+ stat.bins = 'interrupt'
printdata(runs, stat)
print 'total ticks'
options.get = None
options.binned = False
options.graph = False
+ options.ticks = False
- opts, args = getopts(sys.argv[1:], '-BEFGd:g:h:pr:s:u:')
+ opts, args = getopts(sys.argv[1:], '-BEFGd:g:h:pr:s:u:T:')
for o,a in opts:
if o == '-B':
options.binned = True
options.user = a
if o == '-s':
options.system = a
+ if o == '-T':
+ options.ticks = a
if len(args) == 0:
usage()