From d538682ce4c0997e8bffd20a9f80c2977ba9f934 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 24 Aug 2017 11:28:22 +0200 Subject: [PATCH] Report number of CPU cores and threads in system info --- .gitignore | 2 ++ benchmark/foundation/system_info.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 0f9f7c8..7ae7b19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Ignore all directories with binary files. /scenes /blender +# Ignore directories used for development. +/tmp # Ignore production configuration files. /config/*.cfg # Ignore generated datasets. diff --git a/benchmark/foundation/system_info.py b/benchmark/foundation/system_info.py index 21f1694..3c5e7e1 100644 --- a/benchmark/foundation/system_info.py +++ b/benchmark/foundation/system_info.py @@ -1,5 +1,6 @@ import json import platform +import psutil import subprocess import sys @@ -68,6 +69,8 @@ def gatherSystemInfo(ctx): # TODO(sergey): Make this to work on Windows and macOS cpu_info = cpuinfo.get_cpu_info() 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) # TODO(sergey): query number of CPUs and threads. return system_info