MCPcopy Create free account
hub / github.com/adny-code/fastgrind / inspect_command

Function inspect_command

tools/fastgrind.py:2829–2845  ·  view source on GitHub ↗
(engine: FastgrindQueryEngine)

Source from the content-addressed store, hash-verified

2827
2828
2829def inspect_command(engine: FastgrindQueryEngine) -> None:
2830 meta = engine.meta()
2831 print(f"Trace: {meta['path']}")
2832 print(f"Sample interval: {meta['sample_interval_ms']} ms")
2833 print(f"Default window: {meta['default_start_ms']}..{meta['max_tick_ms']} ms")
2834 print(f"Functions: {meta['function_count']}")
2835 print(f"Stack nodes: {meta['stack_node_count']}")
2836 print(f"Threads: {meta['thread_count']}")
2837 print(f"Non-empty ticks: {meta['tick_count']}")
2838 print(f"Total malloc: {_format_bytes(meta['total_malloc_bytes'])}")
2839 print(f"Total free: {_format_bytes(meta['total_free_bytes'])}")
2840 print()
2841 for thread in engine.list_threads():
2842 print(
2843 f"T{thread['thread_id']}: {thread['first_tick_ms']}..{thread['last_tick_ms']} ms, "
2844 f"malloc {_format_bytes(thread['total_malloc_bytes'])}, free {_format_bytes(thread['total_free_bytes'])}"
2845 )
2846
2847
2848def desktop_ui_unavailable_reason() -> str | None:

Callers 1

mainFunction · 0.85

Calls 3

_format_bytesFunction · 0.85
list_threadsMethod · 0.80
metaMethod · 0.45

Tested by

no test coverage detected