add support for processing metrics

Processing metrics indicate how much time a processor takes to generate all of
its output.
This commit is contained in:
Aleix Conchillo Flaqué
2024-06-28 14:19:00 -07:00
parent 8dff460307
commit fd5d879bf5
8 changed files with 93 additions and 19 deletions

View File

@@ -244,8 +244,8 @@ class StopInterruptionFrame(SystemFrame):
class MetricsFrame(SystemFrame):
"""Emitted by processor that can compute metrics like latencies.
"""
ttfb: Mapping[str, float]
ttfb: List[Mapping[str, Any]] | None = None
processing: List[Mapping[str, Any]] | None = None
#
# Control frames