From 900518ae55ab46862bb9b24daf979cc63a354602 Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Fri, 19 Aug 2016 13:49:05 -0500 Subject: [PATCH] Filter reports for ones with title Error report. --- etc/ci/performance/runner.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/etc/ci/performance/runner.py b/etc/ci/performance/runner.py index c098a361612..45e5af7844a 100644 --- a/etc/ci/performance/runner.py +++ b/etc/ci/performance/runner.py @@ -112,21 +112,19 @@ def parse_log(log, testcase=None): print('-----') return placeholder - if key == "testcase": + if key == "testcase" or key == "title": timing[key] = value else: timing[key] = None if (value == "undefined") else int(value) - if testcase is not None and timing['testcase'] != testcase: - print('[DEBUG] log:') - print('-----') - print(log) - print('-----') - return placeholder - return timing - if len(blocks) == 0: + def valid_timing(timing): + return (timing.get('title') != 'Error response') and (testcase is None or timing.get('testcase') == testcase) + + timings = list(filter(valid_timing, map(parse_block, blocks))) + + if len(timings) == 0: print("Didn't find any perf data in the log, test timeout?") print("Fillng in a dummy perf data") print('[DEBUG] log:') @@ -136,7 +134,7 @@ def parse_log(log, testcase=None): return [placeholder] else: - return map(parse_block, blocks) + return timings def filter_result_by_manifest(result_json, manifest):