Report number of CPU cores and threads in system info
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,8 @@
|
|||||||
# Ignore all directories with binary files.
|
# Ignore all directories with binary files.
|
||||||
/scenes
|
/scenes
|
||||||
/blender
|
/blender
|
||||||
|
# Ignore directories used for development.
|
||||||
|
/tmp
|
||||||
# Ignore production configuration files.
|
# Ignore production configuration files.
|
||||||
/config/*.cfg
|
/config/*.cfg
|
||||||
# Ignore generated datasets.
|
# Ignore generated datasets.
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
import platform
|
import platform
|
||||||
|
import psutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@@ -68,6 +69,8 @@ def gatherSystemInfo(ctx):
|
|||||||
# TODO(sergey): Make this to work on Windows and macOS
|
# TODO(sergey): Make this to work on Windows and macOS
|
||||||
cpu_info = cpuinfo.get_cpu_info()
|
cpu_info = cpuinfo.get_cpu_info()
|
||||||
system_info['cpu_brand'] = cpu_info['brand']
|
system_info['cpu_brand'] = cpu_info['brand']
|
||||||
|
system_info["num_cpu_cores"] = psutil.cpu_count(logical=False)
|
||||||
|
system_info["num_cpu_threads"] = psutil.cpu_count(logical=True)
|
||||||
system_info['devices'] = _getBlenderDeviceInfo(ctx)
|
system_info['devices'] = _getBlenderDeviceInfo(ctx)
|
||||||
# TODO(sergey): query number of CPUs and threads.
|
# TODO(sergey): query number of CPUs and threads.
|
||||||
return system_info
|
return system_info
|
||||||
|
Reference in New Issue
Block a user