MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / handler_us

Function handler_us

benchmarks/run_benchmarks.py:316–319  ·  view source on GitHub ↗
(resp: dict)

Source from the content-addressed store, hash-verified

314 queries = [sym.split(".")[-1] for sym in sample_symbols]
315
316 def handler_us(resp: dict) -> int | None:
317 meta = resp.get("result", {}).get("_meta", {})
318 v = meta.get("duration_us")
319 return int(v) if isinstance(v, (int, float)) else None
320
321 def avg_ms(samples: list[int]) -> float | None:
322 return round(sum(samples) / len(samples) / 1000.0, 3) if samples else None

Callers 1

benchmark_tracedecayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected