buildstats-summary: add an option to disable bold

(From OE-Core rev: b9a0ceebe9aa1e79d97508e7ab2fc39ca7c6637f)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jose Quaresma 2023-03-24 19:30:31 +00:00 committed by Richard Purdie
parent e3afe16694
commit 13d4b2a455

View File

@ -75,7 +75,7 @@ def dump_buildstats(args, bs: buildstats.BuildStats):
for t in tasks:
if t.duration >= minimum:
line = f"{t.duration} {t.recipe}:{t.task}"
if t.duration >= highlight:
if args.highlight and t.duration >= highlight:
print(f"\033[1m{line}\033[0m")
else:
print(line)
@ -111,7 +111,7 @@ def main(argv=None) -> int:
type=int,
default=60,
metavar="SECS",
help="Highlight tasks longer than SECS seconds",
help="Highlight tasks longer than SECS seconds (0 disabled)",
)
args = parser.parse_args(argv)