From c38823f9cecd75648f9e88671d91c67027ff69f3 Mon Sep 17 00:00:00 2001 From: Alex Krzos Date: Fri, 11 Dec 2015 11:32:41 -0500 Subject: [PATCH] Fix rallyplot for graphing when rally puts 'n/a' in place of a value due to entire test failure. Change-Id: I2391d21e10db9f65ac195283f6d5b486c02270ce --- graphing/rallyplot.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/graphing/rallyplot.py b/graphing/rallyplot.py index d0a0bc887..c2e2214e4 100755 --- a/graphing/rallyplot.py +++ b/graphing/rallyplot.py @@ -118,9 +118,14 @@ def main(): for concurrency in compiled_results[service][test][iteration][worker_count]: if concurrency not in concurrency_dict: concurrency_dict[concurrency] = [] - concurrency_dict[concurrency].append(float(compiled_results[service][test][iteration][worker_count][concurrency][measurement])) + if str(compiled_results[service][test][iteration][worker_count][concurrency][measurement]) == "n/a": + # Rally will place n/a in place of an actual result when it fails + # completely, we can't graph n/a, so replace with -1 + concurrency_dict[concurrency].append(-1) + else: + concurrency_dict[concurrency].append(float(compiled_results[service][test][iteration][worker_count][concurrency][measurement])) - graph_file_name = '{}/{}-{}-{}-{}.png'.format(rally_graph_dir, service, test, iteration, measurement) + graph_file_name = '{}{}-{}-{}-{}.png'.format(rally_graph_dir, service, test, iteration, measurement) print '----------------------------------------------------------' print 'Test Prefix: {}'.format(args.test_prefix) print 'Service: {}'.format(service)