增加windows 实现

This commit is contained in:
simonchuzz
2023-10-13 22:04:33 +08:00
parent f1bb53fa93
commit 4a4d042c41

View File

@@ -205,8 +205,12 @@ def get_cpu_info():
except:
pass
elif os_type == OSType.WINDOWS:
# TODO
raise NotImplementedError
try:
output = subprocess.check_output('wmic cpu get Name', shell=True).decode("utf-8")
lines = output.splitlines()
cpu_info = lines[2].split(':')[-1].strip()
except:
pass
return os_type, avx_type, cpu_info, distribution