From 042da24e7dfc189e3008ee753ae5984f35b76487 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Wed, 17 Jun 2015 09:46:11 +0100 Subject: [PATCH] antutu: updating result parsing to handle Android M logcat output Looks like M formats logcat output with some extra ":"'s which was screwing up the old parsing logic. --- wlauto/workloads/antutu/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wlauto/workloads/antutu/__init__.py b/wlauto/workloads/antutu/__init__.py index 305baa7b..65cdeed3 100644 --- a/wlauto/workloads/antutu/__init__.py +++ b/wlauto/workloads/antutu/__init__.py @@ -92,8 +92,8 @@ def extract_version4_metrics(fh): metric_counts = defaultdict(int) for line in fh: if 'ANTUTU RESULT:' in line: - parts = line.split(':') - metric = parts[2].strip() + result = line.split('ANTUTU RESULT:')[1] + metric, value_string = [v.strip() for v in result.split(':', 1)] # If times prameter > 1 the same metric will appear # multiple times in logcat -- we want to collet all of # them as they're from different iterations. @@ -101,7 +101,6 @@ def extract_version4_metrics(fh): if metric_counts[metric] > 1: metric += '_' + str(metric_counts[metric]) - value_string = parts[3].strip() # Grahics results report resolution in square brackets # as part of value string. if ']' in value_string: