From 10aa91149c62ebf20576f743254008450ba44dc8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 22 Aug 2017 10:12:38 +0200 Subject: [PATCH] Add quick way to query for device information without rendering anything Ideally we need to print those to the console without any extra storage created, but that's becoming a bit hairy. --- benchmark/farm.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/benchmark/farm.py b/benchmark/farm.py index e7c6f48..cf8747b 100755 --- a/benchmark/farm.py +++ b/benchmark/farm.py @@ -46,6 +46,10 @@ def configureArgumentParser(): help="Do verbose logging", action='store_true', default=False) + parser.add_argument('-i', '--system-info', + help="Only dump system info to the screen", + action='store_true', + default=False) return parser ######################################## @@ -316,7 +320,11 @@ def main(): ctx.device_type = farm_config['device_type'] ctx.device_name = farm_config['device_name'] ctx.image_output_dir = images_output_dir - ctx.scenes = ctx.listAllScenes(ctx.scenes_dir) + # Don't do any scenes when only querying for system information. + if args.system_info: + ctx.scenes = [] + else: + ctx.scenes = ctx.listAllScenes(ctx.scenes_dir) # Print prelmiinary information. blender_dvice_info = benchrunner.benchmarkGetDeviceInfo(ctx) if not blender_dvice_info['device_type']: @@ -346,7 +354,8 @@ def main(): saveResults(ctx, results, results_output_dir) return all_stats is not None finally: - deleteTempDirectory(config, temp_dir) + if not args.system_info: + deleteTempDirectory(config, temp_dir) return True