We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b02800f commit 7db7880Copy full SHA for 7db7880
mx.graalpython/live_heap_tracker.py
@@ -83,6 +83,7 @@ def main():
83
# Run the benchmark once to ensure pyc files are generated
84
subprocess.check_call(benchmark)
85
with open(output_file, 'w') as f:
86
+ t0 = time.time()
87
for _ in range(iterations):
88
proc = subprocess.Popen(benchmark)
89
ppid = proc.pid
@@ -91,6 +92,9 @@ def main():
91
92
uss_bytes = uss(ppid)
93
heap_bytes = jmap(jmap_binary, ppid)
94
f.write(f"{heap_bytes} {uss_bytes}\n")
95
+ # cut short if this is a long benchmark
96
+ if time.time() - t0 > 30:
97
+ break
98
if proc.returncode != 0:
99
sys.exit(proc.returncode)
100
0 commit comments