Skip to content

Commit 3da9775

Browse files
committed
[CI] Logs memeory during CI Run
1 parent 8861b11 commit 3da9775

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

vtr_flow/scripts/run_vtr_flow.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,14 @@ def vtr_command_main(arg_list, prog=None):
488488

489489
finally:
490490
seconds = datetime.now() - start
491+
with open(temp_dir/"vpr.out","r") as fpmem:
492+
for line in fpmem.readlines():
493+
if "Maximum resident set size" in line:
494+
mem_usage = int(line.split()[-1])//1024
491495
print(
492-
"{status} (took {time})".format(
493-
status=error_status, time=vtr.format_elapsed_time(seconds)
496+
"{status} (took {time}, vpr run consumed {max_mem} MB memory)".format(
497+
status=error_status, time=vtr.format_elapsed_time(seconds),
498+
max_mem=mem_usage
494499
)
495500
)
496501
temp_dir.mkdir(parents=True, exist_ok=True)

0 commit comments

Comments
 (0)