Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: dashboard/dashboard/pinpoint/models/job.py

Issue 3002903002: [pinpoint] Refactor Quest Generator. (Closed)
Patch Set: Comments Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 8
9 from google.appengine.api import taskqueue 9 from google.appengine.api import taskqueue
10 from google.appengine.ext import ndb 10 from google.appengine.ext import ndb
11 11
12 from dashboard.common import utils 12 from dashboard.common import utils
13 from dashboard.pinpoint import mann_whitney_u 13 from dashboard.pinpoint import mann_whitney_u
14 from dashboard.pinpoint.models import attempt as attempt_module 14 from dashboard.pinpoint.models import attempt as attempt_module
15 from dashboard.pinpoint.models import change as change_module 15 from dashboard.pinpoint.models import change as change_module
16 from dashboard.services import issue_tracker_service 16 from dashboard.services import issue_tracker_service
17 17
18 18
19 # We want this to be fast to minimize overhead while waiting for tasks to 19 # We want this to be fast to minimize overhead while waiting for tasks to
20 # finish, but don't want to consume too many resources. 20 # finish, but don't want to consume too many resources.
21 _TASK_INTERVAL = 10 21 _TASK_INTERVAL = 10
22 22
23 23
24 _DEFAULT_REPEAT_COUNT = 10
25 _DEFAULT_ATTEMPT_COUNT = 1 24 _DEFAULT_ATTEMPT_COUNT = 1
26 _SIGNIFICANCE_LEVEL = 0.01 25 _SIGNIFICANCE_LEVEL = 0.01
27 26
28 27
29 _DIFFERENT = 'different' 28 _DIFFERENT = 'different'
30 _PENDING = 'pending' 29 _PENDING = 'pending'
31 _SAME = 'same' 30 _SAME = 'same'
32 _UNKNOWN = 'unknown' 31 _UNKNOWN = 'unknown'
33 32
34 33
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 323
325 try: 324 try:
326 p_value = mann_whitney_u.MannWhitneyU(results_a, results_b) 325 p_value = mann_whitney_u.MannWhitneyU(results_a, results_b)
327 except ValueError: 326 except ValueError:
328 return _UNKNOWN 327 return _UNKNOWN
329 328
330 if p_value < _SIGNIFICANCE_LEVEL: 329 if p_value < _SIGNIFICANCE_LEVEL:
331 return _DIFFERENT 330 return _DIFFERENT
332 else: 331 else:
333 return _UNKNOWN 332 return _UNKNOWN
OLDNEW
« no previous file with comments | « dashboard/dashboard/pinpoint/handlers/quest_generator_test.py ('k') | dashboard/dashboard/pinpoint/models/quest_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698