MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / _timer

Function _timer

verl/verl/utils/profiler/performance.py:140–151  ·  view source on GitHub ↗

Inner function that handles the core timing logic. Args: name (str): The name/identifier for this timing measurement. timing_raw (Dict[str, float]): Dictionary to store timing information.

(name: str, timing_raw: dict[str, float])

Source from the content-addressed store, hash-verified

138
139
140def _timer(name: str, timing_raw: dict[str, float]):
141 """Inner function that handles the core timing logic.
142
143 Args:
144 name (str): The name/identifier for this timing measurement.
145 timing_raw (Dict[str, float]): Dictionary to store timing information.
146 """
147 with Timer(name=name, logger=None) as timer:
148 yield
149 if name not in timing_raw:
150 timing_raw[name] = 0
151 timing_raw[name] += timer.last
152
153
154@contextmanager

Callers 4

marked_timerFunction · 0.85
simple_timerFunction · 0.85
marked_timerFunction · 0.85
marked_timerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected