Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hint to the console output if more tasks execute in parallel than being displayed #21354

Open
sschuberth opened this issue Jul 26, 2022 · 0 comments
Labels
a:feature A new functionality in:console output progress tty mintty cygwin cli

Comments

@sschuberth
Copy link
Contributor

Expected Behavior

When executing a build from the command line, the console rows prefixed with > indicate the number of tasks being executed in parallel. If the number of rows does not correspond to the number of tasks being executed in parallel, a hint should be displayed to avoid confusion.

Current Behavior

The number of rows displayed is capped at rows / 2 for terminals where rows is known, or hard-coded to 4 if rows is unknown:

if (maximumAvailableLines == -1) {
// Disallow work-in-progress to take up more than half of the console display
// If the screen size is unknown, allow 4 lines
int rows = consoleMetaData.getRows();
maximumAvailableLines = rows == 0 ? 4 : rows / 2;
}

This means one cannot generally conclude the number of tasks being run in parallel from the number of rows being displayed.

Context

The current behavior has caused irritations when profiling a build for a project on Windows vs. Linux on the same (dual-boot) PC: On Linux the number of >-console-rows was much larger than on Windows although the terminal had much more rows for display in both cases, which led to the (false) assumption that less parallelism was being used on Windows than on Linux.

It turned out that due to MinTTY being used as a terminal on Windows, and the limitation documented at gradle/native-platform#33, it was simply a display issue.

In any case, also if the number of rows in being capped due to the rows / 2 constraint, a hint should be displayed on the console that the number of tasks being executed in parallel might be larger than the number of rows displayed in the console.

@sschuberth sschuberth added a:feature A new functionality to-triage labels Jul 26, 2022
@eskatos eskatos added in:console output progress tty mintty cygwin cli and removed to-triage labels Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:console output progress tty mintty cygwin cli
Projects
None yet
Development

No branches or pull requests

2 participants