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:
Cole Robinson 2013-09-28 17:25:41 -04:00
parent 4822e6478f
commit 7664e5762d

View File

@ -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__":