Skip to content

Commit

Permalink
Merge branch 'main' into do_not_init_logging_on_import
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter authored May 16, 2024
2 parents cb533d5 + e4a0545 commit 2260866
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions continuous_integration/scripts/host_info.py
Original file line number Diff line number Diff line change
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
3 changes: 2 additions & 1 deletion distributed/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import collections
import sys
import threading
import time as timemod
from collections.abc import Callable, Hashable, Iterator
Expand Down Expand Up @@ -93,7 +94,7 @@ def resync(self) -> None:


# A high-resolution wall clock timer measuring the seconds since Unix epoch
if WINDOWS:
if WINDOWS and sys.version_info < (3, 13):
time = _WindowsTime(timemod.time, is_monotonic=False).time
monotonic = _WindowsTime(timemod.monotonic, is_monotonic=True).time
else:
Expand Down

0 comments on commit 2260866

Please sign in to comment.