Skip to content

Commit

Permalink
perf-counter
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Aug 4, 2022
1 parent 0f1a492 commit 67f061b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def inner(*args, **kwargs):
times = []
N = 10
for i in range(N):
start = time.time()
start = time.perf_counter()
fn(i, *args, **kwargs)
times.append(time.time() - start)
times.append(time.perf_counter() - start)
print('%0.3f ... %s' % (round(sum(times) / N, 3), fn.__name__))
return inner

Expand Down

0 comments on commit 67f061b

Please sign in to comment.