昇腾社区首页
中文
注册
开发者
下载

__enter__/__exit__

函数

def __enter__(self)

def __exit__(self, exc_type, exc_val, exc_tb)

函数功能

在进入的时候,自动调用span_start函数,用于记录过程开始的时间点;在退出的时候,自动调用span_end函数,用于记录过程的结束时间点。