MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / render_statistics

Function render_statistics

src/core/service/statistics.py:65–69  ·  view source on GitHub ↗
(start_time: int | float)

Source from the content-addressed store, hash-verified

63
64
65def render_statistics(start_time: int | float) -> str:
66 duration = format_time(time.time() - start_time)
67 memory = format_memory_size(memory_usage())
68 cpu = psutil.cpu_percent(interval=1)
69 return f"CPU: {cpu}%, memory: {memory}, duration: {duration})"

Callers 1

_process_messageMethod · 0.90

Calls 3

format_timeFunction · 0.85
format_memory_sizeFunction · 0.85
memory_usageFunction · 0.85

Tested by

no test coverage detected