From ff37c6743b9331c7fc4a4dc9e5528ddd35611631 Mon Sep 17 00:00:00 2001 From: Sam Mirazi Date: Sun, 1 Jun 2025 21:30:08 -0700 Subject: [PATCH] 15 --- run_benchmark_table.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/run_benchmark_table.py b/run_benchmark_table.py index 0bb3e7f..9c4ba1f 100644 --- a/run_benchmark_table.py +++ b/run_benchmark_table.py @@ -2,6 +2,7 @@ import subprocess import time import re import requests # pip install requests +import webbrowser # Added import from rich.console import Console from rich.table import Table import sys @@ -231,6 +232,14 @@ if __name__ == "__main__": if parsed: results.append({"framework": sc["name"], "config": sc["config"], "delay": sc["delay"], **parsed}) + # Open browser after benchmark completes to avoid interference + try: + console.print(f"[blue]Opening {sc['name']} page at {sc['url']} in browser...[/blue]") + webbrowser.open(sc["url"]) + console.print(f"[blue]Keeping server alive for 5 seconds to view the page...[/blue]") + time.sleep(5) # Keep server alive for 5 seconds + except Exception as e: + console.print(f"[yellow]Could not open browser for {sc['name']}: {e}[/yellow]") finally: stop_server(srv, sc["name"]) console.print() -- 2.25.1