simvx.core.debug.profiler

Frame profiler with ring-buffer timing.

Module Contents

Classes

FrameProfiler

Ring-buffer frame timer. begin()/end() are no-ops when disabled.

Data

API

simvx.core.debug.profiler.__all__

[‘FrameProfiler’]

class simvx.core.debug.profiler.FrameProfiler

Ring-buffer frame timer. begin()/end() are no-ops when disabled.

Initialization

begin(phase: str)
end(phase: str)
end_frame()
count_nodes(tree)

Traverse tree and count nodes/controls. Call once per frame.

property fps: float
property frame_time_ms: float
property node_count: int
property control_count: int
property last_frame: dict[str, float]

Phase timings from the most recent completed frame.

phase_avg_ms(phase: str, count: int = 60) float

Average time for a phase over the last count frames.

frame_times(count: int = 120) list[float]

Recent ‘total’ phase times for graph rendering.