vibeqc.PerfScope¶
- class vibeqc.PerfScope(name)[source]¶
Bases:
objectContext manager that times its body and pushes the wall + CPU delta into the currently active
PerfTracker. No-op when no tracker is active, so call sites can sprinklewith PerfScope("phase_name"): ...unconditionally — the cost when perf logging is off is onecontextvars.ContextVar.get()and onetime.perf_counter()call.Re-entrant: nesting two scopes with the same name accumulates correctly (each scope contributes its own wall/CPU).
- Parameters:
name (str)
Methods
__init__(name)Attributes
- name¶