Skip to content

Commit

Permalink
Tweaked the runner slightly to consume less memory (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
westonpace committed May 20, 2021
1 parent 467ef87 commit a4ec126
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conbench/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ def _get_timing(self, f, iterations, options):
if options["gc_disable"]:
gc.disable()

if output is not None:
# We only need output from the final run.
# For other runs delete before we run the next
# iteration to avoid doubling memory
del output

iteration_start = time.time()
output = f()
times.append(time.time() - iteration_start)
Expand Down

0 comments on commit a4ec126

Please sign in to comment.