diff --git a/thursday/__main__.py b/thursday/__main__.py index 7d41f8c..8e9dbb0 100644 --- a/thursday/__main__.py +++ b/thursday/__main__.py @@ -1,5 +1,5 @@ from .go_benchmark_it import main -main(["thursday", "everything", "-2"]) -main(["thursday", "everything", "-3"]) -main(["thursday", "everything", "-4"]) +main(["thursday", "everything", "-2"], display=False) +main(["thursday", "everything", "-3"], display=False) +main(["thursday", "everything", "-4"], display=False) diff --git a/thursday/go_benchmark_it.py b/thursday/go_benchmark_it.py index 3483a05..3b83c4b 100644 --- a/thursday/go_benchmark_it.py +++ b/thursday/go_benchmark_it.py @@ -154,7 +154,7 @@ for problem_list in GO_BENCHMARKS.values(): ), "please use Infinity instead; it's basically equivalent" -def main(argv): +def main(argv, display=True): from tqdm import tqdm import sys @@ -393,7 +393,7 @@ def main(argv): scores, prices = {}, {} all_opt_names = set() for obj_name, obj_res in results.items(): - if not please_stop_the_spam: + if display and not please_stop_the_spam: print() m1(f"{obj_name}:") all_res = {} @@ -427,10 +427,11 @@ def main(argv): prices[opt_name] + place_scores[mi] / price_insignificance ) - more_scores = perform_another_experimental_scoring_method(results) + if display: + more_scores = perform_another_experimental_scoring_method(results) for blah, points in zip(("best", "worst"), (scores, prices)): - if not no_summary: + if display and not no_summary: print( f"\n\033[1m{blah} scoring optimizers:\033[m" f" (awards={place_scores})" @@ -440,7 +441,7 @@ def main(argv): for opt_name, opt_point in sorted(points.items(), key=lambda t: -t[1]): # place = place_names[i] if i < len(place_names) else " " # delta = scores.get(opt_name, 0) - prices.get(opt_name, 0) - if not no_summary: + if display and not no_summary: print( fancy_output( opt_name, scores.get(opt_name, 0), prices.get(opt_name, 0) @@ -458,7 +459,7 @@ def main(argv): if opt_name not in negative: negative.append(opt_name) - if no_summary: + if display and no_summary: print( f"\n\033[1malternatively scored optimizers:\033[m" f" (awards={place_scores})"