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:
@@ -223,6 +223,16 @@ def modify_device_info(device_info):
|
|||||||
return 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):
|
def benchmark_thread(ctx):
|
||||||
with G.progress_lock:
|
with G.progress_lock:
|
||||||
G.progress_status = "Collecting system information."
|
G.progress_status = "Collecting system information."
|
||||||
@@ -252,7 +262,8 @@ def benchmark_thread(ctx):
|
|||||||
"blender_version": system_info.getBlenderVersion(ctx),
|
"blender_version": system_info.getBlenderVersion(ctx),
|
||||||
"system_info": modify_system_info(blender_system_info),
|
"system_info": modify_system_info(blender_system_info),
|
||||||
"device_info": modify_device_info(blender_device_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:
|
with G.progress_lock:
|
||||||
|
@@ -11,6 +11,11 @@ from . import timeouts, exceptions, sockutil
|
|||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# At this moment the Benchmark Client and the Benchmark Farm (farm.py)
|
||||||
|
# output different JSON schemas.
|
||||||
|
# TODO(Sybren): unify the JSON schemas and also update parse_results.py for this.
|
||||||
|
BENCHMARK_SCHEMA_VERSION = 1
|
||||||
|
|
||||||
|
|
||||||
class SubmissionResult:
|
class SubmissionResult:
|
||||||
"""Metadata of the submitted benchmark.
|
"""Metadata of the submitted benchmark.
|
||||||
@@ -160,7 +165,7 @@ class BenchmarkClient:
|
|||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
'data': benchmark_data,
|
'data': benchmark_data,
|
||||||
'schema_version': 0,
|
'schema_version': BENCHMARK_SCHEMA_VERSION,
|
||||||
}
|
}
|
||||||
log.info('Submitting benchmark to %s:\n%s', self.url_submit,
|
log.info('Submitting benchmark to %s:\n%s', self.url_submit,
|
||||||
json.dumps(payload, sort_keys=True, indent=4))
|
json.dumps(payload, sort_keys=True, indent=4))
|
||||||
|
Reference in New Issue
Block a user