Skip to content

Commit

Permalink
tests/pycore: Break out of loop once MemAvailable was read
Browse files Browse the repository at this point in the history
  • Loading branch information
rantala committed Apr 27, 2022
1 parent d6cd28a commit 0c9a0d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/pycore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ with open("/proc/meminfo") as f:
for line in f:
if line.startswith("MemAvailable:"):
availGB = round(int(line.split()[1]) / 1024 ** 2)
break

print(f"MemAvailable: {availGB}GB", flush=True)

Expand Down

0 comments on commit 0c9a0d8

Please sign in to comment.