OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ Generate bench_expectations file from a given set of bench data files. """ | 6 """ Generate bench_expectations file from a given set of bench data files. """ |
7 | 7 |
8 import argparse | 8 import argparse |
9 import bench_util | 9 import bench_util |
10 import os | 10 import os |
11 import re | 11 import re |
12 import sys | 12 import sys |
13 | 13 |
14 # Parameters for calculating bench ranges. | 14 # Parameters for calculating bench ranges. |
15 RANGE_RATIO_UPPER = 1.5 # Ratio of range for upper bounds. | 15 RANGE_RATIO_UPPER = 1.5 # Ratio of range for upper bounds. |
16 RANGE_RATIO_LOWER = 2.0 # Ratio of range for lower bounds. | 16 RANGE_RATIO_LOWER = 2.0 # Ratio of range for lower bounds. |
17 ERR_RATIO = 0.08 # Further widens the range by the ratio of average value. | 17 ERR_RATIO = 0.08 # Further widens the range by the ratio of average value. |
18 ERR_UB = 1.0 # Adds an absolute upper error to cope with small benches. | 18 ERR_UB = 1.0 # Adds an absolute upper error to cope with small benches. |
19 ERR_LB = 1.5 | 19 ERR_LB = 1.5 |
20 | 20 |
21 # List of bench configs to monitor. Ignore all other configs. | 21 # List of bench configs to monitor. Ignore all other configs. |
22 CONFIGS_TO_INCLUDE = ['simple_viewport_1000x1000', | 22 CONFIGS_TO_INCLUDE = ['simple_viewport_1000x1000', |
| 23 'simple_viewport_1000x1000_angle', |
23 'simple_viewport_1000x1000_gpu', | 24 'simple_viewport_1000x1000_gpu', |
24 'simple_viewport_1000x1000_scalar_1.100000', | 25 'simple_viewport_1000x1000_scalar_1.100000', |
25 'simple_viewport_1000x1000_scalar_1.100000_gpu', | 26 'simple_viewport_1000x1000_scalar_1.100000_gpu', |
26 ] | 27 ] |
27 | 28 |
28 # List of flaky entries that should be excluded. Each entry is defined by a list | 29 # List of flaky entries that should be excluded. Each entry is defined by a list |
29 # of 3 strings, corresponding to the substrings of [bench, config, builder] to | 30 # of 3 strings, corresponding to the substrings of [bench, config, builder] to |
30 # search for. A bench expectations line is excluded when each of the 3 strings | 31 # search for. A bench expectations line is excluded when each of the 3 strings |
31 # in the list is a substring of the corresponding element of the given line. For | 32 # in the list is a substring of the corresponding element of the given line. For |
32 # instance, ['desk_yahooanswers', 'gpu', 'Ubuntu'] will skip expectation entries | 33 # instance, ['desk_yahooanswers', 'gpu', 'Ubuntu'] will skip expectation entries |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 'expected': expected, | 130 'expected': expected, |
130 'lower_bound': lower_bound, | 131 'lower_bound': lower_bound, |
131 'upper_bound': upper_bound}) | 132 'upper_bound': upper_bound}) |
132 | 133 |
133 with open(args.output_file, 'w') as file_handle: | 134 with open(args.output_file, 'w') as file_handle: |
134 file_handle.write('\n'.join(out_lines)) | 135 file_handle.write('\n'.join(out_lines)) |
135 | 136 |
136 | 137 |
137 if __name__ == "__main__": | 138 if __name__ == "__main__": |
138 main() | 139 main() |
OLD | NEW |