Less verbose decorator message
This commit is contained in:
parent
6e6a46b6c9
commit
63ef2fe6b5
@ -12,15 +12,9 @@ def timeit(name):
|
||||
result = original(*args, **kwargs)
|
||||
t1 = time.perf_counter()
|
||||
if (t1 - t0) > 1:
|
||||
print(
|
||||
f"Time to evaluate problem {int(name[7:]):003d}: "
|
||||
f"{(t1 - t0):.3f} s\n"
|
||||
)
|
||||
print(f"Took: {(t1 - t0):.3f} s\n")
|
||||
else:
|
||||
print(
|
||||
f"Time to evaluate problem {int(name[7:]):003d}: "
|
||||
f"{(t1 - t0)*1000:.3f} ms\n"
|
||||
)
|
||||
print(f"Took: {(t1 - t0)*1000:.3f} ms\n")
|
||||
return result
|
||||
|
||||
return wrapper
|
||||
|
Loading…
x
Reference in New Issue
Block a user