Add first-bot-speech latency to UserBotLatencyObserver

Measure time from ClientConnectedFrame to first BotStartedSpeakingFrame,
emitting a one-time on_first_bot_speech_latency event with breakdown.
This commit is contained in:
Mark Backman
2026-03-01 09:11:10 -05:00
parent 18155b6a63
commit ddba1b84a9
5 changed files with 174 additions and 16 deletions

View File

@@ -0,0 +1 @@
- Added `on_first_bot_speech_latency` event to `UserBotLatencyObserver` measuring the time from client connection to first bot speech, including a latency breakdown with per-service metrics.

View File

@@ -1 +1 @@
- Added `LatencyBreakdown` dataclass and `on_latency_breakdown` event to `UserBotLatencyObserver` for per-service latency metrics (TTFB, text aggregation, user turn duration) collected during each user-to-bot response cycle.
- Added `on_latency_breakdown` event to `UserBotLatencyObserver` providing per-service TTFB, text aggregation, and user turn duration metrics for each user-to-bot response cycle.