sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #06688
Re: [Merge] ~maas-committers/maas-ci/+git/system-tests:improve-ansible-performance into ~maas-committers/maas-ci/+git/system-tests:master
Diff comments:
> diff --git a/systemtests/ansible.py b/systemtests/ansible.py
> index 7c671c8..b69b96b 100644
> --- a/systemtests/ansible.py
> +++ b/systemtests/ansible.py
> @@ -554,4 +608,8 @@ class AnsibleMain:
> ]
> if _debug := re.match(r"-(v)+", debug or self.default_debug or ""):
> cmd.append(str(_debug.group()))
> - self.instance.execute(cmd, environment=self._proxy_env)
> + runtime = Timer(
> + partial(self.instance.execute, command=cmd, environment=self._proxy_env)
> + ).timeit(number=1)
> + self.log_runtime(inspect.stack()[1].function, runtime)
Get the name of the test that called ansible_main.run_playbook(), without relying on human intervention? If there is a better method I'm all ears.
> + self.logger.info(f"Playbook execution took {timedelta(seconds=runtime)}")
--
https://code.launchpad.net/~maas-committers/maas-ci/+git/system-tests/+merge/440179
Your team MAAS Committers is requested to review the proposed merge of ~maas-committers/maas-ci/+git/system-tests:improve-ansible-performance into ~maas-committers/maas-ci/+git/system-tests:master.