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

Function avg_ms

benchmarks/run_benchmarks.py:135–141  ·  view source on GitHub ↗
(fn, items: list[str])

Source from the content-addressed store, hash-verified

133 sample = rng.sample(symbols, min(NUM_QUERY_SAMPLES, len(symbols)))
134
135 def avg_ms(fn, items: list[str]) -> float | None:
136 times: list[float] = []
137 for it in items:
138 t = time.perf_counter()
139 fn(it)
140 times.append(time.perf_counter() - t)
141 return round(sum(times) / len(times) * 1000, 3) if times else None
142
143 out["find_symbol_avg_ms"] = avg_ms(queries["find_symbol"], sample)
144 out["get_function_source_avg_ms"] = avg_ms(queries["get_function_source"], sample)

Callers 2

benchmark_token_saviorFunction · 0.85
benchmark_tracedecayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected