forked from qt-creator/qt-creator
Debugger: Support p1 on Windows
Change-Id: Id634dc37b2708f9cb88e5b01ff758d5adcde215e Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user