knotty: improve the UI information
PATCH 1/1 knotty: improve the UI information
During a build you might end up with bitbake telling you:
Currently 30 running tasks (2757 of 2757/3476 of 6390)
Which, to me, is really confusing. For one the forward slash separator and the two numbers immediately on each side of which are likely to be interpreted as being one unit (i.e. 2757/3476) but they're not.
Add labels, spaces, etc. to help clarify the information bitbake is trying to convey.
--- lib/bb/ui/knotty.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/bb/ui/knotty.py +3 -3
@@ -276,11 +276,11 @@ class TerminalFilter(object): print(content) else: if self.quiet: - content = "Running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) + content = "Running tasks (setscene:%s/%s tasks:%s/%s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) elif not len(activetasks): - content = "No currently running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) + content = "No currently running tasks (setscene:%s/%s tasks:%s/%s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) else: - content = "Currently %2s running tasks (%s of %s/%s of %s)" % (len(activetasks), self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) + content = "Currently %2s running tasks (setscene:%s/%s tasks:%s/%s)" % (len(activetasks), self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) maxtask = self.helper.tasknumber_total if not self.main_progress or self.main_progress.maxval != maxtask: widgets = [' ', progressbar.Percentage(), ' ', progressbar.Bar()]
Signature · 1 line
2.34.1.75.gabe6bb3905
Quoted 9 lines
-----Original Message-----
From: [email protected] <bitbake- [email protected]> On Behalf Of Trevor Woerner
Sent: den 26 januari 2022 02:17
To: [email protected]
Subject: [bitbake-devel] [PATCH] knotty: improve the UI informationDuring a build you might end up with bitbake telling you:
Quoted 8 lines
Currently 30 running tasks (2757 of 2757/3476 of 6390)Which, to me, is really confusing. For one the forward slash separator and the two numbers immediately on each side of which are likely to be interpreted as being one unit (i.e. 2757/3476) but they're not.
Add labels, spaces, etc. to help clarify the information bitbake is trying to convey.
While I agree with what you are trying to achieve, the suggested line is very verbose. If my calculations are correct, that leaves only 5-7 characters for the progress bar in an 80 character window. Here is the original line:
Currently 99 running tasks (12345 of 12345/12345 of 12345) 100% |##############| No currently running tasks (12345 of 12345/12345 of 12345) 100% |##############|
And here is the updated one:
Currently 99 running tasks (setscene:12345/12345 tasks:12345/12345) 100% |#####| No currently running tasks (setscene:12345/12345 tasks:12345/12345) 100% |#####|
Dropping "Currently ", which is not really needed, would be a start. That would also give the "No running tasks ..." variant the same formatting:
99 running tasks (setscene:12345/12345 tasks:12345/12345) 100% |###############| No running tasks (setscene:12345/12345 tasks:12345/12345) 100% |###############|
Personally, I would have preferred the even terser form, since I know what those numbers represent:
99 running tasks (12345/12345, 12345/12345) 100% |#############################| No running tasks (12345/12345, 12345/12345) 100% |#############################|
but that might be too much to ask. And I don't have good alternatives to "setscene" and "tasks".
(And if anybody wonders, I love watching those progress bars move across the window, which is why I don't want them reduced to only a few characters.) ;)
//Peter
Quoted 27 lines
Signed-off-by Trevor Woerner <[email protected]>--- lib/bb/ui/knotty.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)lib/bb/ui/knotty.py +3
-4@@ -276,11 +276,11 @@ class TerminalFilter(object): print(content) else: if self.quiet: - content = "Running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) + content = "Running tasks (setscene:%s/%s tasks:%s/%s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) elif not len(activetasks): - content = "No currently running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) + content = "No currently running tasks (setscene:%s/%s tasks:%s/%s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) else: - content = "Currently %2s running tasks (%s of %s/%s of %s)" % (len(activetasks), self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) + content = "Currently %2s running tasks (setscene:%s/%s tasks:%s/%s)" % (len(activetasks), self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total) maxtask = self.helper.tasknumber_total if not self.main_progress or self.main_progress.maxval != maxtask: widgets = [' ', progressbar.Percentage(), ' ', progressbar.Bar()] --2.34.1.75.gabe6bb3905