diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-06 14:36:53 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-06 14:36:53 -0400 |
commit | d24c15acde4f061f174fecc1f3312da2dea5ba19 (patch) | |
tree | ee827fe08291881f0bc59bd2a7b424825bd6e434 /bin/cluster | |
parent | a7f98a0b8c19d7d20c2e9761104ca24affbbb249 (diff) | |
parent | 1bab4edd3d8cd3201bf210312f18fc9841c339d3 (diff) | |
download | openshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.tar.gz openshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.tar.bz2 openshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.tar.xz openshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.zip |
Merge pull request #291 from lhuard1A/profile
Add a --profile option to spot which task takes more time
Diffstat (limited to 'bin/cluster')
-rwxr-xr-x | bin/cluster | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/cluster b/bin/cluster index 720dd230c..fbbffadc9 100755 --- a/bin/cluster +++ b/bin/cluster @@ -184,6 +184,9 @@ class Cluster(object): verbose, inventory, ansible_env, playbook ) + if args.profile: + command = 'ANSIBLE_CALLBACK_PLUGINS=ansible-profile/callback_plugins ' + command + if args.verbose > 1: command = 'time {}'.format(command) @@ -240,6 +243,9 @@ if __name__ == '__main__': meta_parser.add_argument('-o', '--option', action='append', help='options') + meta_parser.add_argument('-p', '--profile', action='store_true', + help='Enable playbook profiling') + action_parser = parser.add_subparsers(dest='action', title='actions', description='Choose from valid actions') |