diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Options.py | 2 | ||||
-rwxr-xr-x | src/sbin/bcfg2-info | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py index b497c138f..8f3df5f39 100644 --- a/src/lib/Options.py +++ b/src/lib/Options.py @@ -220,7 +220,7 @@ CLIENT_EXTRA_DISPLAY = Option('enable extra entry output', default=False, cmd='-e', ) CLIENT_PARANOID = Option('make automatic backups of config files', default=False, cmd='-P', ) -CORE_PROFILE = Option('profile server core', +CORE_PROFILE = Option('profile server core', odesc='<profile trace path>', default=False, cmd='-p', ) CLIENT_AGENT = Option('run in agent (continuous) mode, wait for reconfigure command from server', default=False, cmd='-A', ) CLIENT_DRIVERS = Option('Specify tool driver set', cmd='-D', diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 72e6c42e0..4f7228c8e 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -2,7 +2,7 @@ '''This tool loads the Bcfg2 core into an interactive debugger''' __revision__ = '$Revision$' -import copy, logging, lxml.etree, sys, cmd, tempfile +import copy, logging, lxml.etree, sys, cmd import Bcfg2.Logger, Bcfg2.Server.Core, os import Bcfg2.Server.Plugins.Metadata, Bcfg2.Server.Plugin import Bcfg2.Options @@ -317,15 +317,13 @@ if __name__ == '__main__': '-d' in sys.argv, []) else: import hotshot, hotshot.stats - pfd, pfile = tempfile.mkstemp() - prof = hotshot.Profile(pfile) + prof = hotshot.Profile(setup['profile']) try: prof.runcall(main, setup['repo'], setup['plugins'], setup['password'], setup['encoding'], '-d' in sys.argv, ['exit']) except SystemExit: - stats = hotshot.stats.load(pfile) + stats = hotshot.stats.load(setup['profile']) stats.strip_dirs() stats.sort_stats('time', 'calls') stats.print_stats(80) - print pfile raise |