]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
server: clean up call of write_profile_stats
authorChris Larson <chris_larson@mentor.com>
Wed, 16 Feb 2011 00:07:00 +0000 (17:07 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 16 Feb 2011 00:07:04 +0000 (17:07 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/server/process.py

index 51a99182b266dc201fca21588f3486af41c92b67..26f72b026632f9dfffc45002d73889a0fd7a85ab 100644 (file)
@@ -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()