Fix run_profile.py
This commit is contained in:
parent
b9abb04e4e
commit
568ea37346
@ -10,7 +10,7 @@ from shutil import rmtree
|
|||||||
|
|
||||||
sys.path.insert(0, getcwd())
|
sys.path.insert(0, getcwd())
|
||||||
|
|
||||||
from qutebrowser.app import QuteBrowser # pylint: disable=unused-import
|
import qutebrowser.qutebrowser # pylint: disable=unused-import
|
||||||
|
|
||||||
tempdir = mkdtemp()
|
tempdir = mkdtemp()
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ else:
|
|||||||
callgraphfile = os.path.join(tempdir, 'callgraph')
|
callgraphfile = os.path.join(tempdir, 'callgraph')
|
||||||
|
|
||||||
profiler = cProfile.Profile()
|
profiler = cProfile.Profile()
|
||||||
profiler.run('app = QuteBrowser(); app.exec_()')
|
profiler.run('qutebrowser.qutebrowser.main()')
|
||||||
profiler.dump_stats(profilefile)
|
profiler.dump_stats(profilefile)
|
||||||
|
|
||||||
call(['pyprof2calltree', '-k', '-i', profilefile, '-o', callgraphfile])
|
call(['pyprof2calltree', '-k', '-i', profilefile, '-o', callgraphfile])
|
||||||
|
Loading…
Reference in New Issue
Block a user