OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 collections | 5 import collections |
6 import logging | 6 import logging |
7 import os | 7 import os |
8 import traceback | 8 import traceback |
9 | 9 |
10 from google.appengine.api import taskqueue | 10 from google.appengine.api import taskqueue |
11 from google.appengine.ext import ndb | 11 from google.appengine.ext import ndb |
12 | 12 |
13 from dashboard.common import utils | 13 from dashboard.common import utils |
14 from dashboard.pinpoint import mann_whitney_u | 14 from dashboard.pinpoint import mann_whitney_u |
15 from dashboard.pinpoint.models import attempt as attempt_module | 15 from dashboard.pinpoint.models import attempt as attempt_module |
16 from dashboard.pinpoint.models import change as change_module | 16 from dashboard.pinpoint.models import change as change_module |
17 from dashboard.services import gitiles_service | 17 from dashboard.services import gitiles_service |
18 from dashboard.services import issue_tracker_service | 18 from dashboard.services import issue_tracker_service |
19 | 19 |
20 | 20 |
21 # We want this to be fast to minimize overhead while waiting for tasks to | 21 # We want this to be fast to minimize overhead while waiting for tasks to |
22 # finish, but don't want to consume too many resources. | 22 # finish, but don't want to consume too many resources. |
23 _TASK_INTERVAL = 10 | 23 _TASK_INTERVAL = 10 |
24 | 24 |
25 | 25 |
26 _DEFAULT_REPEAT_COUNT = 12 | 26 _DEFAULT_REPEAT_COUNT = 15 |
27 _SIGNIFICANCE_LEVEL = 0.001 | 27 _SIGNIFICANCE_LEVEL = 0.001 |
28 | 28 |
29 | 29 |
30 _DIFFERENT = 'different' | 30 _DIFFERENT = 'different' |
31 _PENDING = 'pending' | 31 _PENDING = 'pending' |
32 _SAME = 'same' | 32 _SAME = 'same' |
33 _UNKNOWN = 'unknown' | 33 _UNKNOWN = 'unknown' |
34 | 34 |
35 | 35 |
36 _ROUND_PUSHPIN = u'\U0001f4cd' | 36 _ROUND_PUSHPIN = u'\U0001f4cd' |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 try: | 373 try: |
374 p_value = mann_whitney_u.MannWhitneyU(values_a, values_b) | 374 p_value = mann_whitney_u.MannWhitneyU(values_a, values_b) |
375 except ValueError: | 375 except ValueError: |
376 return _UNKNOWN | 376 return _UNKNOWN |
377 | 377 |
378 if p_value < _SIGNIFICANCE_LEVEL: | 378 if p_value < _SIGNIFICANCE_LEVEL: |
379 return _DIFFERENT | 379 return _DIFFERENT |
380 else: | 380 else: |
381 return _UNKNOWN | 381 return _UNKNOWN |
OLD | NEW |