fix(test): Restore performance threshold bounds and add profiling to test
This commit is contained in:
@@ -11,13 +11,9 @@ from src import session_logger
|
||||
def _get_app_attr(app: Any, name: str, default: Any = None) -> Any:
|
||||
if hasattr(app, name):
|
||||
val = getattr(app, name)
|
||||
sys.stderr.write(f"[DEBUG] _get_app_attr: found {name} in app -> {val}\n")
|
||||
sys.stderr.flush()
|
||||
return val
|
||||
if hasattr(app, 'controller') and hasattr(app.controller, name):
|
||||
val = getattr(app.controller, name)
|
||||
sys.stderr.write(f"[DEBUG] _get_app_attr: found {name} in controller -> {val}\n")
|
||||
sys.stderr.flush()
|
||||
return val
|
||||
return default
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ def test_performance_benchmarking(live_gui: tuple) -> None:
|
||||
client = ApiHookClient()
|
||||
# Wait for app to stabilize and render some frames
|
||||
time.sleep(3.0)
|
||||
client.set_value("perf_profiling_enabled", True)
|
||||
time.sleep(0.5)
|
||||
# Collect metrics over 5 seconds
|
||||
fps_values = []
|
||||
cpu_values = []
|
||||
|
||||
Reference in New Issue
Block a user