Skip to content

Commit

Permalink
Fix "Print host info" CI step on Mac OS (arm64) (#8638)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait committed May 7, 2024
1 parent 1ec61a1 commit d5edb4e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions continuous_integration/scripts/host_info.py
Expand Up @@ -30,11 +30,16 @@ def main() -> None:
bench()
print(f"Crude CPU benchmark (higher is better): {bench():.1f}")

freqs = psutil.cpu_freq(percpu=True)
print("CPU frequency:")
for freq in freqs:
# FIXME types-psutil
print(f" - current={freq.current}, min={freq.min}, max={freq.max}") # type: ignore
try:
freqs = psutil.cpu_freq(percpu=True)
# https://github.com/giampaolo/psutil/issues/2382
except RuntimeError:
print("CPU frequency: not available")
else:
print("CPU frequency:")
for freq in freqs:
# FIXME types-psutil
print(f" - current={freq.current}, min={freq.min}, max={freq.max}") # type: ignore

mem = psutil.virtual_memory()
print("Memory:")
Expand Down

0 comments on commit d5edb4e

Please sign in to comment.