MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / test_metrics_snapshot

Function test_metrics_snapshot

tests/test_observability.py:15–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def test_metrics_snapshot():
16 m = RoutingMetrics()
17 m.record_routing(tier=0, model="test", method="direct", confidence=0.9)
18 snap = m.snapshot()
19 assert snap["total_requests"] == 1
20 assert "avg_confidence" in snap
21
22
23def test_log_entry_json():

Callers

nothing calls this directly

Calls 3

record_routingMethod · 0.95
snapshotMethod · 0.95
RoutingMetricsClass · 0.90

Tested by

no test coverage detected