Skip to contentSkip to conversation

knotty: improve the UI information

PATCH In review Trevor Woerner 4 participants 4 messages Jan 27, 2022 – Feb 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v3 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. 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. Also nothing is labeled, leaving the user to wonder what these numbers are.

Add labels, spaces, etc. to help clarify the information bitbake is trying to convey. The resulting line would appear as:

	30 running tasks (setscene:2757/2757 tasks:3476/6390)

---
changes since v2:
- update the "No currently running tasks" message to "No running tasks" (i.e. remove the word "currently") for consistency
- remove the double space between the two sets of values

changes since v1:
- improve the commit message
- remove the redundant word "Currently" in order to help keep the total line length manageable for users of 80-column terminals

---
 lib/bb/ui/knotty.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/bb/ui/knotty.py +3 -3
index 484545a6..2404d996 100644
@@ -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 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 = "%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
#1 lore raw
Quoted 9 lines · Trevor Woerner

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. 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. Also nothing is labeled, leaving the user to wonder what these numbers are.

Quoted 4 lines

Add labels, spaces, etc. to help clarify the information bitbake is trying to convey. The resulting line would appear as:

	30 running tasks (setscene:2757/2757 tasks:3476/6390)

I agree we shouldn't have used / as a separator, my fault on that.

If we're going to change this again we need to get it right and I feel we're not quite there yet. I was wondering about:

30 running tasks (3476 of 6390), (Setscene: 2757 of 2757)

which moves the "tasks" closer together however my other worry is that people don't know what setscene tasks are and that the setscene piece is then not ordered before tasks. The "of" keyword does clearly indicate something to some subgroup of users, I think I was once advised about that.

We could consider:

Setscene tasks: 2757 of 2757
30 running tasks: 3476 of 6390

which would break the code assumptions about a single line but we can likely fix that...

Cheers,

Richard

#2 lore raw

Hi Richard,

Quoted 13 lines · Richard Purdie
Quoted 12 lines · Trevor Woerner

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. 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. Also nothing is labeled, leaving the user to wonder what these numbers are.

Add labels, spaces, etc. to help clarify the information bitbake is trying to convey. The resulting line would appear as:

Quoted 7 lines
Quoted 1 line
	30 running tasks (setscene:2757/2757 tasks:3476/6390)

I agree we shouldn't have used / as a separator, my fault on that.

If we're going to change this again we need to get it right and I feel we're not quite there yet. I was wondering about:

30 running tasks (3476 of 6390), (Setscene: 2757 of 2757)

I agree that this would be an improvement.

Quoted 4 lines

which moves the "tasks" closer together however my other worry is that people don't know what setscene tasks are and that the setscene piece is then not ordered before tasks.

Yes, this could be confusing for people who don't know what setscene tasks are.

Quoted 10 lines

The "of" keyword does clearly indicate something to some subgroup of users, I think I was once advised about that.

We could consider:

Setscene tasks: 2757 of 2757
30 running tasks: 3476 of 6390

which would break the code assumptions about a single line but we can likely fix that...

This would be much clearer indeed. I vote for this solution. Just my 2 cents.
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw
Quoted 30 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Michael Opdenacker via lists.openembedded.org
Sent: den 1 februari 2022 15:17
To: Richard Purdie <[email protected]>; Trevor Woerner <[email protected]>; [email protected]
Subject: Re: [bitbake-devel] [PATCH v3] knotty: improve the UI information

Hi Richard,

Quoted 13 lines · Richard Purdie
Quoted 12 lines · Trevor Woerner

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. 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. Also nothing is labeled, leaving the user to wonder what these numbers are.

Add labels, spaces, etc. to help clarify the information bitbake is trying to convey. The resulting line would appear as:

Quoted 7 lines
Quoted 1 line
	30 running tasks (setscene:2757/2757 tasks:3476/6390)

I agree we shouldn't have used / as a separator, my fault on that.

If we're going to change this again we need to get it right and I feel we're not quite there yet. I was wondering about:

30 running tasks (3476 of 6390), (Setscene: 2757 of 2757)

Quoted 8 lines

I agree that this would be an improvement.

Quoted 3 lines

which moves the "tasks" closer together however my other worry is that people don't know what setscene tasks are and that the setscene piece is then not ordered before tasks.

Yes, this could be confusing for people who don't know what setscene tasks are.

I am not sure that actually matters that much. My guess is that to many people running bitbake, it is doing black magic. And none of the numbers really mean anything to them. As long as the numbers keep increasing, and the build finishes when they reach max, they will be happy.

Quoted 2 lines
Quoted 2 lines

The "of" keyword does clearly indicate something to some subgroup of users, I think I was once advised about that.

I cannot really see why:

30 running tasks (3476/6390), (Setscene: 2757/2757)

would be harder to understand than:

30 running tasks (3476 of 6390), (Setscene: 2757 of 2757)

but with this formatting, either variant is fine to me.

Quoted 10 lines
Quoted 7 lines

We could consider:

Setscene tasks: 2757 of 2757
30 running tasks: 3476 of 6390

which would break the code assumptions about a single line but we can likely fix that...

This would be much clearer indeed. I vote for this solution. Just my 2 cents.

I don't see any real benefit in splitting the line in two, to be honest. It just sounds like a lot of work for very little gain.

Quoted 2 lines

Cheers
Michael.

//Peter