# Copyright 2013-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import re from collections import defaultdict from wlauto import AndroidUiAutoBenchmark TEST_TYPES = { 'benchmark_cpu_branching_logic': 'time', 'benchmark_cpu_matrix_int': 'time', 'benchmark_cpu_matrix_long': 'time', 'benchmark_cpu_matrix_short': 'time', 'benchmark_cpu_matrix_byte': 'time', 'benchmark_cpu_matrix_float': 'time', 'benchmark_cpu_matrix_double': 'time', 'benchmark_cpu_checksum': 'time', 'benchmark_cpu': 'aggregate', 'benchmark_memory_transfer': 'time', 'benchmark_memory': 'aggregate', 'benchmark_io_fs_write': 'time', 'benchmark_io_fs_read': 'time', 'benchmark_io_db_write': 'time', 'benchmark_io_db_read': 'time', 'benchmark_io': 'aggregate', 'benchmark_g2d_fractal': 'rate', 'benchmark_g2d': 'aggregate', 'benchmark_g3d_corridor': 'rate', 'benchmark_g3d_planet': 'rate', 'benchmark_g3d_dna': 'rate', 'benchmark_g3d': 'aggregate', 'benchmark': 'aggregate', } TYPE_TESTS = defaultdict(list) for k, v in TEST_TYPES.iteritems(): TYPE_TESTS[v].append(k) TYPE_UNITS = { 'time': 'ms', 'rate': 'Hz', } REGEX_TEMPLATES = { 'aggregate': r'(?P{}) aggregate score is (?P\d+)', 'time': r'(?P{}) executed in (?P