diff mbox series

buildstats-summary: add an option to disable bold

Message ID 20230324193031.3059235-1-jose.quaresma@foundries.io
State Accepted, archived
Commit b9a0ceebe9aa1e79d97508e7ab2fc39ca7c6637f
Headers show
Series buildstats-summary: add an option to disable bold | expand

Commit Message

Jose Quaresma March 24, 2023, 7:30 p.m. UTC
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 scripts/buildstats-summary | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/scripts/buildstats-summary b/scripts/buildstats-summary
index 89348318af..f521d78650 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)