Include Benchmark Client version information in the result JSON

This part of the JSON schema isn't required yet. When missing, the version
is assumed to be -∞
This commit is contained in:
2018-08-16 14:43:29 +02:00
parent c4139613f8
commit 03ad327ca2
2 changed files with 18 additions and 2 deletions

View File

@@ -223,6 +223,16 @@ def modify_device_info(device_info):
return device_info
def benchmark_client_info() -> dict:
"""Metadata about the Benchmark Client itself."""
from ..version import version
return {
'client_version': version,
}
def benchmark_thread(ctx):
with G.progress_lock:
G.progress_status = "Collecting system information."
@@ -252,7 +262,8 @@ def benchmark_thread(ctx):
"blender_version": system_info.getBlenderVersion(ctx),
"system_info": modify_system_info(blender_system_info),
"device_info": modify_device_info(blender_device_info),
"scenes": all_stats if all_stats else {}
"scenes": all_stats if all_stats else {},
"benchmark_client": benchmark_client_info(),
})
with G.progress_lock: