#21587 Add duration information to stats + pants logs
Issue created by
drubinstein
Is your feature request related to a problem? Please describe.
We are trying to understand what steps in our transitive builds are slow. From what I can tell in the documentation, Pants does not have a way to display how long a build task takes.
Describe the solution you'd like
A couple of solutions.
1. Add the duration it takes for a task to take. I believe that could be done by adding timing information to Results and modifying the
check log.
2. Add durations stats as an option to the stats block in pants.toml. If set, then a table of tasks and their durations would print at the end of execution.
Describe alternatives you've considered
I've thought about making a new "timer rule" for every task, but that seems excessive.
Additional context
An example of what I'm asking for:
Before:
13:11:38.34 [INFO] Completed: Run Pytest - dir1:test1 - succeeded.
13:11:39.30 [INFO] Completed: Run Pytest - dir2:tests2 - succeeded.
After:
13:11:38.34 [INFO] Completed: Run Pytest - dir1:test1 - succeeded in 53s.
13:11:39.30 [INFO] Completed: Run Pytest - dir2:tests2 - succeeded in 2m45s.
pantsbuild/pants