pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.33k stars 638 forks source link

Show progress in addition to the timer in dynamic UI swimlane lines. #11965

Open jsirois opened 3 years ago

jsirois commented 3 years ago

In particular, when a Process execution is being reported in a swim lane, it might be nice to see something like:

⠴ [11.26s 6.1% cpu 1MB/s down 0MB/s up | Resolving ...

And then maybe even rollups in the log lines that stick above the dynamic UI when appropriate:

15:38:33.47 [INFO] Completed [26.12s 5.2% cpu 25MB down 0MB up | Building requirements.pex
stuhood commented 3 years ago

This is a really great idea.

stuhood commented 3 years ago

This also relates to #11375: the rendered lines are workunits, and we will only render workunits at particular levels (implemented as log levels by default). It's possible that unless we do something to render more-specific child workunits (which might be at debug level), we won't end up rendering the relevant child workunits which could potentially have gauges or metrics attached.

stuhood commented 3 years ago

Opened #12255 for some underlying support.

stuhood commented 3 years ago

Another thing that would be great to be able to support would be rendering the last line of output of a process in the UI. That would require a mutable field on a workunit which might generically be the "status" of the workunit. This could also be rendered in the "Long-running tasks" output.

kaos commented 3 years ago

rendering the last line of output [...]

Love this idea. Perhaps allow multiple lines in case it is the only process currently running?

Been thinking about something like this for when running the "Resolving constraints.txt"... as that is often done as a sequential operation before anything else kicks off.. and as that can take a significant amount of time, it would be generous to allow it to show what is going on behind the scenes, but I think a single line could potentially be a bit blurry, but if we allowed a small number of lines, that would be a little bit better.

$ ./pants test ::
⠈ 5.72s Resolving constraints.txt
Collecting packaging==21.0
  Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting pex==2.1.54
  Using cached pex-2.1.54-py2.py3-none-any.whl (2.6 MB)
Collecting psutil==5.8.0
  Using cached psutil-5.8.0-cp38-cp38-macosx_10_9_x86_64.whl (236 kB)

(So the last 6 lines of output here could be scrolling output from the task...)

Eric-Arellano commented 3 years ago

I love that. It would help so much with the frustration of "Is Pants even doing anything? Is it hung?"