Skip to content

Commit

Permalink
fix benching
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-the-Bomb committed Dec 16, 2023
1 parent 053788f commit e1977d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aoc-py/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ def run_day(day: int) -> None:
line = '+-----+' + '-' * len(text) + '+'
print(f'\n{line}\n| PY3 |{text}|\n{line}')

inp = get_input(day)
# benchmark and run
start = perf_counter()
solution.run(get_input(day))
solution.run(inp)
end = perf_counter()

print(line := f'Execution time: {(end - start) * 1000:.2f}ms')
Expand Down

0 comments on commit e1977d1

Please sign in to comment.