Produce benchmark JSON schema v2

- No more '(Display)' strings in the GPU names, but store devices as
  `{'name': name, 'type': 'CPU/CUDA/OPENCL', 'is_display': bool}`
- Introduces testing with py.test & pipenv. The test suite is far from
  complete, though.
This commit is contained in:
2018-08-28 12:11:01 +02:00
parent 34dd5eec25
commit 4726ee0c9c
12 changed files with 356 additions and 181 deletions

View File

@@ -11,6 +11,8 @@ import tempfile
SCRIPT_PATH = os.path.realpath(__file__)
SCRIPT_DIR = os.path.dirname(SCRIPT_PATH)
RESULT_JSON_SCHEMA_VERSION = 2
import foundation
from foundation import (benchrunner,
buildbot,
@@ -286,8 +288,10 @@ def ensureImageOutputDir(results_output_dir):
def getResultJSONString(ctx, results):
import copy
# Convert custom classes to dictionaries for easier JSON dump.
json_results = results
json_results = copy.deepcopy(results)
json_results['schema_version'] = RESULT_JSON_SCHEMA_VERSION
stats = json_results['stats']
for scene in ctx.scenes:
if scene not in stats: