gotestyourself / gotestsum

'go test' runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test results.
Apache License 2.0
1.99k stars 118 forks source link

dots-v2: fix jitteriness, again #388

Open howardjohn opened 4 months ago

howardjohn commented 4 months ago

This had some previous fixes:

These do not fully fix the problem, only mask the issues.

The real issues arise when there are 100s of packages to display, but only so much screen space. As each one bounces around, the text is entirely unreadable. The previous approaches was to more effieciently update the lines to make it more incremental.

The approach here is different - simple but extremely effective. Instead of trying to constantly write out the entire set of lines/packages under test, on each event, we keep track of a active and completed set of packages.

Once a package is completed, we write it out one last time, and then never overwrite it. The active set is treated as we do today.

This means if we have 8 core machine and 1000 packages, we are only updating 8 lines at a time, which removes all jitteriness.

The current PR totally breaks windows. If there is desire to move forward I can try to get it working on windows, but I don't have a windows machine so its a struggle for me