This commit is contained in:
shenjack 2024-06-29 01:04:25 +08:00
parent 2f00a3f29a
commit 047cc110a4
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -20,8 +20,11 @@ def local_env_info() -> str:
# 参考 DR 的 (crash report)
cache.write(f"系统: {platform.platform()}\n")
# 处理器
try:
cache.write("|".join([f"{x}%" for x in psutil.cpu_percent(interval=1, percpu=True)]))
cache.write("\n")
except OSError:
cache.write("CPU: 未知\n")
# Python 版本信息
cache.write(f"{platform.python_implementation()}: {platform.python_version()}-{platform.python_branch()}({platform.python_compiler()})\n")
# 内存信息