Spaces:
Runtime error
Runtime error
File size: 333 Bytes
dbea546 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import time
def log_execution_time(func):
def wrapper(*args, **kwargs):
start_time = time.time()
result = func(*args, **kwargs)
end_time = time.time()
execution_time = end_time - start_time
print(f"Func {func.__name__} Cost {execution_time} s")
return result
return wrapper
|