| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import re | 6 import re |
| 7 import time | 7 import time |
| 8 import urllib | 8 import urllib |
| 9 | 9 |
| 10 from . import depot_config | 10 from . import depot_config |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 # When we look for the next revision to build, we search nearby revisions | 41 # When we look for the next revision to build, we search nearby revisions |
| 42 # looking for a revision that's already been archived. Since we don't want | 42 # looking for a revision that's already been archived. Since we don't want |
| 43 # to move *too* far from the original revision, we'll cap the search at 25%. | 43 # to move *too* far from the original revision, we'll cap the search at 25%. |
| 44 DEFAULT_SEARCH_RANGE_PERCENTAGE = 0.25 | 44 DEFAULT_SEARCH_RANGE_PERCENTAGE = 0.25 |
| 45 | 45 |
| 46 # How long to re-test the initial good-bad range for until significant | 46 # How long to re-test the initial good-bad range for until significant |
| 47 # difference is established. | 47 # difference is established. |
| 48 REGRESSION_CHECK_TIMEOUT = 2 * 60 * 60 | 48 REGRESSION_CHECK_TIMEOUT = 2 * 60 * 60 |
| 49 # If we reach this number of samples on the reference range and have not | 49 # If we reach this number of samples on the reference range and have not |
| 50 # achieved statistical significance, bail. | 50 # achieved statistical significance, bail. |
| 51 MAX_REQUIRED_SAMPLES = 25 | 51 MAX_REQUIRED_SAMPLES = 15 |
| 52 | 52 |
| 53 # Significance level to use for determining difference between revisions via | 53 # Significance level to use for determining difference between revisions via |
| 54 # hypothesis testing. | 54 # hypothesis testing. |
| 55 SIGNIFICANCE_LEVEL = 0.005 | 55 SIGNIFICANCE_LEVEL = 0.005 |
| 56 | 56 |
| 57 _FAILED_INITIAL_CONFIDENCE_ABORT_REASON = ( | 57 _FAILED_INITIAL_CONFIDENCE_ABORT_REASON = ( |
| 58 'The metric values for the initial "good" and "bad" revisions ' | 58 'The metric values for the initial "good" and "bad" revisions ' |
| 59 'do not represent a clear regression.') | 59 'do not represent a clear regression.') |
| 60 | 60 |
| 61 _DIRECTION_OF_IMPROVEMENT_ABORT_REASON = ( | 61 _DIRECTION_OF_IMPROVEMENT_ABORT_REASON = ( |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 }) | 843 }) |
| 844 return revision_rows | 844 return revision_rows |
| 845 | 845 |
| 846 def _get_build_url(self): | 846 def _get_build_url(self): |
| 847 properties = self.api.m.properties | 847 properties = self.api.m.properties |
| 848 bot_url = properties.get('buildbotURL', | 848 bot_url = properties.get('buildbotURL', |
| 849 'http://build.chromium.org/p/chromium/') | 849 'http://build.chromium.org/p/chromium/') |
| 850 builder_name = urllib.quote(properties.get('buildername', '')) | 850 builder_name = urllib.quote(properties.get('buildername', '')) |
| 851 builder_number = str(properties.get('buildnumber', '')) | 851 builder_number = str(properties.get('buildnumber', '')) |
| 852 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) | 852 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) |
| OLD | NEW |