Debugger: Support p1 on Windows

Change-Id: Id634dc37b2708f9cb88e5b01ff758d5adcde215e
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Orgad Shaneh
2014-03-26 15:31:03 +02:00
committed by hjk
parent 95507d325e
commit 311868a696
+4 -2
View File
@@ -1750,10 +1750,12 @@ theDumper = Dumper()
#######################################################################
def p1(args):
import tempfile
import cProfile
cProfile.run('bb("%s")' % args, "/tmp/bbprof")
tempDir = tempfile.gettempdir() + "/bbprof"
cProfile.run('bb("%s")' % args, tempDir)
import pstats
pstats.Stats('/tmp/bbprof').sort_stats('time').print_stats()
pstats.Stats(tempDir).sort_stats('time').print_stats()
return ""
registerCommand("p1", p1)