Ver código fonte

garbage collection before every run

Snej69420 5 meses atrás
pai
commit
ad1438b1cc
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      benchmarks/benchmark.py

+ 3 - 0
benchmarks/benchmark.py

@@ -1,5 +1,6 @@
 #!/usr/bin/env python3
 import os
+import gc
 import subprocess
 import csv
 import sys
@@ -42,6 +43,8 @@ def create_graph(file, title=None):
 
 def run_devstone(run_simulation_func, model_type, depth, width, mode, out, mem_cmd, stats, DCP, *, classic=False, number=1, gen_mode="uniform"):
     """Runs the simulation function in-process and handles memory profiling asynchronously if needed."""
+    gc.collect()
+
     pp_proc = None
     if mem_cmd:
         my_pid = os.getpid()