MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / __aexit__

Method __aexit__

lightx2v/utils/profiler.py:190–200  ·  view source on GitHub ↗
(self, exc_type, exc_val, exc_tb)

Source from the content-addressed store, hash-verified

188 elapsed = total_elapsed - excluded
189 if self.enable_recorder and self.metrics_func:
190 if self.metrics_labels:
191 self.metrics_func.labels(*self.metrics_labels).observe(elapsed)
192 else:
193 self.metrics_func.observe(elapsed)
194 if self.enable_logger:
195 suffix = " (non-sync)" if self._skip_sync else ""
196 display_elapsed = elapsed * 1000 if self.time_unit == "ms" else elapsed
197 logger.info(f"[Profile] {self.rank_info} - {self.name} cost {display_elapsed:.6f} {self.time_unit}{memory_suffix}{suffix}")
198 return False
199
200 def __call__(self, func):
201 if asyncio.iscoroutinefunction(func):
202
203 @wraps(func)

Callers

nothing calls this directly

Calls 3

_get_excluded_time_stackFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected