diff --git a/benchmark/farm.py b/benchmark/farm.py index f606363..e5f8962 100755 --- a/benchmark/farm.py +++ b/benchmark/farm.py @@ -288,11 +288,9 @@ def ensureImageOutputDir(results_output_dir): def getResultJSONString(ctx, results): - import copy # Convert custom classes to dictionaries for easier JSON dump. - json_results = copy.deepcopy(results) - json_results['schema_version'] = RESULT_JSON_SCHEMA_VERSION - stats = json_results['stats'] + results['schema_version'] = RESULT_JSON_SCHEMA_VERSION + stats = results['stats'] for scene in ctx.scenes: if scene not in stats: continue @@ -301,7 +299,7 @@ def getResultJSONString(ctx, results): stats[scene]['result'] = 'OK' else: stats[scene] = {'result': 'CRASH'} - return json.dumps(json_results, sort_keys=True, indent=2) + return json.dumps(results, sort_keys=True, indent=2) def saveResults(ctx, results, output_dir):