diff options
author | Lénaïc Huard <lhuard@amadeus.com> | 2015-06-22 17:16:07 +0200 |
---|---|---|
committer | Lénaïc Huard <lhuard@amadeus.com> | 2015-06-22 17:16:07 +0200 |
commit | 519c6ac8eeeed9d2438c1cc705fbf49f0ad75fdf (patch) | |
tree | b9feecbddecbe1f1e63f082064077b47f9f889cd /bin | |
parent | a7ac3f7b513fe57ddccad15bdb6c7e9091f16bcd (diff) | |
download | openshift-519c6ac8eeeed9d2438c1cc705fbf49f0ad75fdf.tar.gz openshift-519c6ac8eeeed9d2438c1cc705fbf49f0ad75fdf.tar.bz2 openshift-519c6ac8eeeed9d2438c1cc705fbf49f0ad75fdf.tar.xz openshift-519c6ac8eeeed9d2438c1cc705fbf49f0ad75fdf.zip |
Add a --profile option to spot which task takes more time
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cluster | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/cluster b/bin/cluster index 2ea389523..954322482 100755 --- a/bin/cluster +++ b/bin/cluster @@ -178,6 +178,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) @@ -234,6 +237,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') |