From bce898edfb2c669751ed6b5cb974f5b7c596e871 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 25 Jun 2023 14:13:00 -0700 Subject: [PATCH] summary layout --- scripts/benchmark.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/benchmark.py b/scripts/benchmark.py index 85401587c..42fd67381 100644 --- a/scripts/benchmark.py +++ b/scripts/benchmark.py @@ -173,14 +173,19 @@ def summarize_results(dirname, all_results, total_tests=None): if key in results: variants[key].add(results[key]) - console = Console(style="green", highlight=False) + console = Console(highlight=False) console.rule() console.print(dirname) + console.print() - console.print(f"{completed_tests} test-cases") + console.print(f"test-cases: {completed_tests}") for key, val in variants.items(): + if len(val) > 1: + style = "red" + else: + style = None val = ", ".join(val) - console.print(f"{key}: {val}") + console.print(f"{key}: {val}", style=style) console.print() for i in range(retries): @@ -196,7 +201,7 @@ def summarize_results(dirname, all_results, total_tests=None): projected_cost = avg_cost * total_tests console.print( - f"Cost: ${avg_cost:.4f} average, ${total_cost:.2f} total, ${projected_cost:.2f} projected" + f"costs: ${avg_cost:.4f} average, ${total_cost:.2f} total, ${projected_cost:.2f} projected" ) console.rule()