diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/stats/info.py | 4 | ||||
-rwxr-xr-x | util/stats/stats.py | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/util/stats/info.py b/util/stats/info.py index fa318a650..d11619765 100644 --- a/util/stats/info.py +++ b/util/stats/info.py @@ -152,7 +152,7 @@ class Statistic(object): 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 @@ -252,7 +252,7 @@ class FormulaStat(object): 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 diff --git a/util/stats/stats.py b/util/stats/stats.py index 68ba2b8ea..7c1633888 100755 --- a/util/stats/stats.py +++ b/util/stats/stats.py @@ -202,6 +202,10 @@ def commands(options, command, args): 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' @@ -216,7 +220,7 @@ def commands(options, command, args): printdata(runs, stat) print 'interrupt ticks' - stat.bins = 'user' + stat.bins = 'interrupt' printdata(runs, stat) print 'total ticks' @@ -249,7 +253,7 @@ def commands(options, command, args): printdata(runs, stat) print 'interrupt ticks' - stat.bins = 'user' + stat.bins = 'interrupt' printdata(runs, stat) print 'total ticks' @@ -578,8 +582,9 @@ if __name__ == '__main__': 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 @@ -603,6 +608,8 @@ if __name__ == '__main__': options.user = a if o == '-s': options.system = a + if o == '-T': + options.ticks = a if len(args) == 0: usage() |