(name)
| 16 | # 上下文管理器方式 |
| 17 | @contextmanager |
| 18 | def timeblock(name): |
| 19 | start = time.perf_counter() |
| 20 | yield |
| 21 | end = time.perf_counter() |
| 22 | print(f'{name} took {(end-start)*1000:.2f} ms') |
nothing calls this directly
no outgoing calls
no test coverage detected