OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be found | 3 # Use of this source code is governed by a BSD-style license that can be found |
4 # in the LICENSE file. | 4 # in the LICENSE file. |
5 | 5 |
6 """ Analyze recent SkPicture or Microbench data, and output suggested ranges. | 6 """ Analyze recent SkPicture or Microbench data, and output suggested ranges. |
7 | 7 |
8 The outputs can be edited and pasted to bench_expectations.txt to trigger | 8 The outputs can be edited and pasted to bench_expectations_<builder>.txt to |
9 buildbot alerts if the actual benches are out of range. Details are documented | 9 trigger buildbot alerts if the actual benches are out of range. Details are |
10 in the .txt file. | 10 documented in the corresponding .txt file for each builder. |
11 | 11 |
12 Currently the easiest way to batch update bench_expectations.txt is to delete | 12 Currently the easiest way to batch update bench_expectations_<builder>.txt is to |
13 all bench lines, run this script, and redirect outputs (">>") to be added to the | 13 delete all bench lines, run this script, and redirect outputs (">>") to be added |
14 .txt file. | 14 to the corresponding .txt file for each perf builder. |
15 You can also just manually change a few lines of interest, of course. | 15 You can also just manually change a few lines of interest, of course. |
16 | 16 |
17 Note: since input data are stored in Google Storage, you will need to set up | 17 Note: since input data are stored in Google Storage, you will need to set up |
18 the corresponding library. | 18 the corresponding library. |
19 See http://developers.google.com/storage/docs/gspythonlibrary for details. | 19 See http://developers.google.com/storage/docs/gspythonlibrary for details. |
20 """ | 20 """ |
21 | 21 |
22 __author__ = 'bensong@google.com (Ben Chen)' | 22 __author__ = 'bensong@google.com (Ben Chen)' |
23 | 23 |
24 import bench_util | 24 import bench_util |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 else: | 172 else: |
173 rev_min = int(range_match.group(1)) | 173 rev_min = int(range_match.group(1)) |
174 rev_max = int(range_match.group(2)) | 174 rev_max = int(range_match.group(2)) |
175 OutputBenchExpectations(options.bench_type, rev_min, rev_max, options.alg) | 175 OutputBenchExpectations(options.bench_type, rev_min, rev_max, options.alg) |
176 else: | 176 else: |
177 parser.error('Please provide mandatory flag %s' % OPTION_REVISION_RANGE) | 177 parser.error('Please provide mandatory flag %s' % OPTION_REVISION_RANGE) |
178 | 178 |
179 | 179 |
180 if '__main__' == __name__: | 180 if '__main__' == __name__: |
181 main() | 181 main() |
OLD | NEW |