feat(sdk): add bounded media admission, diagnostics and H264 recovery
Introduce deadline-bound admission and common diagnostics for constrained links. Add H264 packetization, recovery and the measured two-thread veryfast encoder path.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from missioncore_plugin_sdk.runtime_metrics import LATENCY_BOUNDS_MS, LatencyStats
|
||||
|
||||
|
||||
def test_histogram_is_fixed_space_and_snapshot_is_independent():
|
||||
stats = LatencyStats()
|
||||
for v in LATENCY_BOUNDS_MS:
|
||||
stats.observe(v / 1000)
|
||||
stats.observe(2)
|
||||
stats.observe(float("nan"))
|
||||
stats.observe(-1)
|
||||
value = stats.snapshot()
|
||||
assert value["count"] == 8 and value["bins"] == [1] * 8
|
||||
assert value["max_ms"] == 2000
|
||||
value["bins"][0] = 99
|
||||
assert stats.snapshot()["bins"][0] == 1
|
||||
assert len(stats.bins) == 8
|
||||
Reference in New Issue
Block a user