change wrapped function name to "timing" for log entry

This commit is contained in:
Martin A. Brown 2016-02-26 23:18:24 -08:00
parent ee68a453d2
commit 066f319156
1 changed files with 2 additions and 2 deletions

View File

@ -22,14 +22,14 @@ logdir = 'tldp-document-build-logs'
def logtimings(logmethod):
def anon(f):
def timedfunc(*args, **kwargs):
def timing(*args, **kwargs):
s = time.time()
result = f(*args, **kwargs)
e = time.time()
logmethod('running %s(%r, %r) took %.3f s',
f.__name__, args, kwargs, e - s)
return result
return timedfunc
return timing
return anon