From: Jose Quaresma Date: Fri, 24 Mar 2023 19:30:31 +0000 (+0000) Subject: buildstats-summary: add an option to disable bold X-Git-Tag: 2023-04-mickledore~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9a0ceebe9aa1e79d97508e7ab2fc39ca7c6637f;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git buildstats-summary: add an option to disable bold Signed-off-by: Jose Quaresma Signed-off-by: Alexandre Belloni --- diff --git a/scripts/buildstats-summary b/scripts/buildstats-summary index 89348318afa..f521d78650b 100755 --- a/scripts/buildstats-summary +++ b/scripts/buildstats-summary @@ -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)