(self, exc_type, exc_val, exc_tb)
| 571 | return self |
| 572 | |
| 573 | def __exit__(self, exc_type, exc_val, exc_tb): |
| 574 | self.elapsed = time.time() - self.start_time |
| 575 | logger = logging.getLogger(__name__) |
| 576 | logger.debug(f"{self.name} 耗时: {self.elapsed:.2f} 秒") |
| 577 | |
| 578 | def get_elapsed(self) -> float: |
| 579 | """获取经过的时间(秒)""" |
nothing calls this directly
no outgoing calls
no test coverage detected