measure#
- Profiler.measure(name: str)#
Time the wrapped block and accumulate it under
name.- Parameters:
- name
str Leaf name for this measurement. The recorded category is the slash-joined concatenation of all enclosing
measureblocks plus this name (e.g."compute_gradient/set_adj").
- name
- Yields:
NoneYields control back to the caller for the duration of the measurement.
Notes
Safe to use on disabled profilers: the context is still entered and exited but no time is recorded.