| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = 15 | 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.01 |
| 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 = ( |
| 62 'The metric values for the initial "good" and "bad" revisions match the ' | 62 'The metric values for the initial "good" and "bad" revisions match the ' |
| 63 'expected direction of improvement. Thus, likely represent an improvement ' | 63 'expected direction of improvement. Thus, likely represent an improvement ' |
| 64 'and not a regression.') | 64 'and not a regression.') |
| 65 | 65 |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 }) | 844 }) |
| 845 return revision_rows | 845 return revision_rows |
| 846 | 846 |
| 847 def _get_build_url(self): | 847 def _get_build_url(self): |
| 848 properties = self.api.m.properties | 848 properties = self.api.m.properties |
| 849 bot_url = properties.get('buildbotURL', | 849 bot_url = properties.get('buildbotURL', |
| 850 'http://build.chromium.org/p/chromium/') | 850 'http://build.chromium.org/p/chromium/') |
| 851 builder_name = urllib.quote(properties.get('buildername', '')) | 851 builder_name = urllib.quote(properties.get('buildername', '')) |
| 852 builder_number = str(properties.get('buildnumber', '')) | 852 builder_number = str(properties.get('buildnumber', '')) |
| 853 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) | 853 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) |
| OLD | NEW |