diff --git a/benchmark/space/__init__.py b/benchmark/space/__init__.py index dda183a..d8e5a4a 100644 --- a/benchmark/space/__init__.py +++ b/benchmark/space/__init__.py @@ -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: diff --git a/benchmark/submission/client.py b/benchmark/submission/client.py index e0e752c..9e50924 100644 --- a/benchmark/submission/client.py +++ b/benchmark/submission/client.py @@ -11,6 +11,11 @@ from . import timeouts, exceptions, sockutil 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: """Metadata of the submitted benchmark. @@ -160,7 +165,7 @@ class BenchmarkClient: payload = { 'data': benchmark_data, - 'schema_version': 0, + 'schema_version': BENCHMARK_SCHEMA_VERSION, } log.info('Submitting benchmark to %s:\n%s', self.url_submit, json.dumps(payload, sort_keys=True, indent=4))