summaryrefslogtreecommitdiffstats
path: root/lib/bb/server/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/server/process.py')
-rw-r--r--lib/bb/server/process.py9
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()