Feature request: time measurement / operation profiling
Is your feature request related to a problem? Please describe
I would like to measure time from pyinfra start to end of all operations. Thanks to this I could easily see speed differences for different instance types and make better decisions.
Describe the solution you'd like
It is enought if pyinfra would write: "Finished, took 11 min 35 s."
Hi @karolzlot - I like this idea and would like to expand it to enable time profiling of operation calls everyhwere (time both generate + execute phases for each operation).
For a super quick way to achieve a basic timing for the entire execution, you can use the time command on nix systems and there's a powershell equivalent for Windows systems.
Yes, I am using it like this now and it works good:
Measure-Command { pyinfra inventory.py deploy.py -vvv | Out-Default }
It would be also helpful to have the current time for each line in -vvv output. I could then see how long time each command within .sh script took.