diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-02-15 17:07:00 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2011-02-15 17:07:04 -0700 |
commit | cd43144f0fe8487bb4dc8a7bd7be7a9ac071ecdd (patch) | |
tree | 0536dab76cde39b708461167d2b07cb98d1a70b9 | |
parent | dbc0cf970140cfb18c58d8110eef5cef10ea33cb (diff) | |
download | bitbake-cd43144f0fe8487bb4dc8a7bd7be7a9ac071ecdd.tar.gz |
server: clean up call of write_profile_stats
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r-- | lib/bb/server/process.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py index 51a99182b..26f72b026 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -104,17 +104,16 @@ class ProcessServer(Process): return profiler.runcall(self.main) finally: profiler.dump_stats(self.profile_filename) - self.write_profile_stats(self.profile_filename, - self.profile_processed_filename) + self.write_profile_stats() sys.__stderr__.write("Raw profiling information saved to %s and " "processed statistics to %s\n" % (self.profile_filename, self.profile_processed_filename)) - def write_profile_stats(self, infn, outfn): + def write_profile_stats(self): import pstats - with open(outfn, 'w') as outfile: - stats = pstats.Stats(infn, stream=outfile) + with open(self.profile_processed_filename, 'w') as outfile: + stats = pstats.Stats(self.profile_filename, stream=outfile) stats.sort_stats('time') stats.print_stats() stats.print_callers() |