-sharp -*- coding: utf-8 -*-
import time, functools
def metric(fn):
-sharp
def wrapper(*args, **kw):
startTime = time.time()
tmp = fn(*args, **kw)
endTime = time.time()
print("%s executed in %s s" % (fn.__name__, endTime - startTime ))
return tmp
return wrapper
Why do you fill in @ funtools.wraps (fn)?