feat(新功能):

fix(修复bug): RunTime判定修改为0.05秒内触发打印
docs(文档变更):
refactor(重构):
test(增加测试):
This commit is contained in:
zhouchengrong
2025-01-10 15:02:28 +08:00
parent 0e5f1ae1fa
commit 9e1a1996c7

View File

@@ -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