feat(新功能):
fix(修复bug): RunTime判定修改为0.05秒内触发打印 docs(文档变更): refactor(重构): test(增加测试):
This commit is contained in:
@@ -7,9 +7,9 @@ def RunTime(func):
|
||||
t1 = time.time()
|
||||
res = func(*args, **kwargs)
|
||||
t2 = time.time()
|
||||
# if t2 - t1 > 0.05:
|
||||
# logging.info(f"function:【{func.__name__}】,runtime:【{str(t2 - t1)}】s")
|
||||
logging.info(f"function:【{func.__name__}】,runtime:【{str(t2 - t1)}】s")
|
||||
if t2 - t1 > 0.05:
|
||||
logging.info(f"function:【{func.__name__}】,runtime:【{str(t2 - t1)}】s")
|
||||
# logging.info(f"function:【{func.__name__}】,runtime:【{str(t2 - t1)}】s")
|
||||
return res
|
||||
|
||||
return wrapper
|
||||
|
||||
Reference in New Issue
Block a user