diff options
-rw-r--r-- | util/stats/db.py | 2 | ||||
-rw-r--r-- | util/stats/info.py | 2 | ||||
-rw-r--r-- | util/stats/profile.py | 13 |
3 files changed, 8 insertions, 9 deletions
diff --git a/util/stats/db.py b/util/stats/db.py index 0d321a360..1ece6df88 100644 --- a/util/stats/db.py +++ b/util/stats/db.py @@ -158,7 +158,7 @@ class Database(object): print 'run "%s" not found' % job return None - from info import scalar, vector, value, total, len + from info import scalar, vector, value, values, total, len stat.system = self[job.system] if scalar(stat): return value(stat, run.run) diff --git a/util/stats/info.py b/util/stats/info.py index 9932d7922..889af6d53 100644 --- a/util/stats/info.py +++ b/util/stats/info.py @@ -51,7 +51,7 @@ def values(stat, run): stat = unproxy(stat) result = [] for i in xrange(len(stat)): - val = value(stat, run.run, i) + val = value(stat, run, i) if val is None: return None result.append(val) diff --git a/util/stats/profile.py b/util/stats/profile.py index cf946452b..57b854a30 100644 --- a/util/stats/profile.py +++ b/util/stats/profile.py @@ -316,7 +316,7 @@ class Profile(object): symbols.tree.dot(dot, threshold=threshold) dot.write(symbols.filename[:-3] + 'dot') - def write_txt(self, jobfile=None, jobs=None): + def write_txt(self, jobfile=None, jobs=None, limit=None): if jobs is None: jobs = [ job for job in jobfile.jobs() ] @@ -327,7 +327,7 @@ class Profile(object): continue output = file(symbols.filename[:-3] + 'txt', 'w') - symbols.display(output) + symbols.display(output, limit) def display(self, jobfile=None, jobs=None, limit=None): if jobs is None: @@ -453,6 +453,8 @@ if __name__ == '__main__': else: profile = PCProfile() + if not categorize: + profile.categorize = None profile.inputdir(jobfile.rootdir) if graph: @@ -470,11 +472,6 @@ if __name__ == '__main__': profile.cpu = cpu profile.write_dot(jobfile=jobfile, threshold=threshold) - if not categorize: - for cpu in cpus: - profile.cpu = cpu - profile.categorize = None - if textout: for cpu in cpus: profile.cpu = cpu @@ -482,5 +479,7 @@ if __name__ == '__main__': if not graph and not textout and not dodot: for cpu in cpus: + if not categorize: + profile.categorize = None profile.cpu = cpu profile.display(jobfile=jobfile, limit=numsyms) |