Add ClientConnectedFrame and transport readiness timing

Introduce ClientConnectedFrame (SystemFrame) pushed by all transports
when a client connects. StartupTimingObserver uses this to measure
transport readiness — the time from StartFrame to first client
connection — via a new on_transport_readiness_measured event.
This commit is contained in:
Mark Backman
2026-03-01 08:45:59 -05:00
parent 58aa8e1ba5
commit 0836066898
11 changed files with 172 additions and 20 deletions

View File

@@ -111,6 +111,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
for timing in report.processor_timings:
logger.info(f" {timing.processor_name}: {timing.duration_secs:.3f}s")
@startup_observer.event_handler("on_transport_readiness_measured")
async def on_transport_readiness_measured(observer, report):
logger.info(f"Transport readiness: {report.readiness_secs:.3f}s")
turn_observer = task.turn_tracking_observer
if turn_observer: