mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virt-manager: Remove hotshot --profile command
Much easier to just do python -m cProfile -s time virt-manager.py --debug, and its way faster.
This commit is contained in:
parent
4822e6478f
commit
7664e5762d
13
virt-manager
13
virt-manager
@ -102,10 +102,6 @@ def parse_commandline():
|
|||||||
optParser.epilog = ("Also accepts standard GTK arguments like "
|
optParser.epilog = ("Also accepts standard GTK arguments like "
|
||||||
"--g-fatal-warnings")
|
"--g-fatal-warnings")
|
||||||
|
|
||||||
# Generate runtime performance profile stats with hotshot
|
|
||||||
optParser.add_option("--profile", dest="profile",
|
|
||||||
help=optparse.SUPPRESS_HELP, metavar="FILE")
|
|
||||||
|
|
||||||
# Trace every libvirt API call to debug output
|
# Trace every libvirt API call to debug output
|
||||||
optParser.add_option("--trace-libvirt", dest="tracelibvirt",
|
optParser.add_option("--trace-libvirt", dest="tracelibvirt",
|
||||||
help=optparse.SUPPRESS_HELP, action="store_true")
|
help=optparse.SUPPRESS_HELP, action="store_true")
|
||||||
@ -289,15 +285,8 @@ def main():
|
|||||||
engine.show_manager_window = False
|
engine.show_manager_window = False
|
||||||
engine.skip_autostart = True
|
engine.skip_autostart = True
|
||||||
|
|
||||||
|
|
||||||
# Finally start the app for real
|
# Finally start the app for real
|
||||||
if options.profile is not None:
|
engine.application.run(None)
|
||||||
import hotshot
|
|
||||||
prof = hotshot.Profile(options.profile)
|
|
||||||
prof.runcall(engine.application.run, None)
|
|
||||||
prof.close()
|
|
||||||
else:
|
|
||||||
engine.application.run(None)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user