MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / execution_timer

Function execution_timer

apps/common/utils/tool_code.py:389–394  ·  view source on GitHub ↗
(id="")

Source from the content-addressed store, hash-verified

387
388@contextmanager
389def execution_timer(id=""):
390 start = time.perf_counter()
391 try:
392 yield
393 finally:
394 maxkb_logger.debug(f"Tool execution({id}) takes {time.perf_counter() - start:.6f} seconds.")

Callers 1

exec_codeMethod · 0.85

Calls 1

debugMethod · 0.45

Tested by

no test coverage detected