Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from google.appengine.ext import ndb | |
| 6 | |
| 7 | |
| 8 class CLConfidence(ndb.Model): | |
|
stgao
2016/10/06 01:57:59
Should we versionize this model to keep track of i
chanli
2016/10/07 00:01:12
That's already taken care of with the original imp
| |
| 9 """Stores confidence data of different types of suspected CLs. | |
| 10 | |
| 11 Confidence data includes confidence scores and the numbers we used to get | |
| 12 those scores. | |
| 13 | |
| 14 The types of suspected CLs are: | |
| 15 1. CLs for compile failures found by Heuristic approach. | |
| 16 a. The score has been further refined by the top score of hints. | |
| 17 2. CLs for compile failures found by Try Job approach. | |
| 18 3. CLs for compile failures found by both approaches. | |
| 19 4. CLs for test failures found by Heuristic approach. | |
| 20 a. The score has been further refined by the top score of hints. | |
| 21 5. CLs for test failures found by Try Job approach. | |
| 22 6. CLs for test failures found by both approaches. | |
| 23 """ | |
| 24 | |
| 25 # Start date of querying suspected CLs. | |
| 26 # Note: the confidence scores will be for all the CLs up until end_date, | |
| 27 # not just for CLs from start date to end_date. | |
| 28 start_date = ndb.DateTimeProperty(indexed=False) | |
| 29 | |
| 30 # End date of querying suspected CLs. | |
| 31 end_date = ndb.DateTimeProperty(indexed=True) | |
| 32 | |
|
stgao
2016/10/06 01:57:59
Add another field for when the confidence data is
chanli
2016/10/07 00:01:12
It seems not useful for me. I think end_date is su
| |
| 33 # Confidence scores for CLs for compile failures found by Heuristic approach. | |
| 34 # A dict like below: | |
| 35 # { | |
| 36 # '1': { | |
| 37 # 'correct': 30, | |
| 38 # 'total': 40, | |
| 39 # 'confidence': 0.75 | |
| 40 # }, | |
|
stgao
2016/10/06 01:57:59
Can we use another model to record the data? And u
chanli
2016/10/07 00:01:12
Done.
| |
| 41 # ... | |
| 42 # } | |
| 43 compile_heuristic = ndb.JsonProperty(indexed=False, compressed=True) | |
| 44 | |
| 45 # Confidence score for CLs for compile failures found by Try Job approach. | |
| 46 # A dict like below: | |
| 47 # { | |
| 48 # 'correct': 96, | |
| 49 # 'total': 100, | |
| 50 # 'confidence': 0.96 | |
| 51 # } | |
| 52 compile_try_job = ndb.JsonProperty(indexed=False, compressed=True) | |
| 53 | |
| 54 # Confidence score for CLs for compile failures found by both approaches. | |
| 55 # A dict like below: | |
| 56 # { | |
| 57 # 'correct': 20, | |
| 58 # 'total': 20, | |
| 59 # 'confidence': 1.00 | |
| 60 # } | |
| 61 compile_heuristic_try_job = ndb.JsonProperty(indexed=False, compressed=True) | |
| 62 | |
| 63 # Confidence scores for CLs for test failures found by Heuristic approach. | |
| 64 # A dict like below: | |
| 65 # { | |
| 66 # '1': { | |
| 67 # 'correct': 30, | |
| 68 # 'total': 40, | |
| 69 # 'confidence': 0.75 | |
| 70 # }, | |
| 71 # ... | |
| 72 # } | |
| 73 test_heuristic = ndb.JsonProperty(indexed=False, compressed=True) | |
| 74 | |
| 75 # Confidence score for CLs for test failures found by Try Job approach. | |
| 76 # A dict like below: | |
| 77 # { | |
| 78 # 'correct': 96, | |
| 79 # 'total': 100, | |
| 80 # 'confidence': 0.96 | |
| 81 # } | |
| 82 test_try_job = ndb.JsonProperty(indexed=False, compressed=True) | |
| 83 | |
| 84 # Confidence score for CLs for test failures found by both approaches. | |
| 85 # A dict like below: | |
| 86 # { | |
| 87 # 'correct': 20, | |
| 88 # 'total': 20, | |
| 89 # 'confidence': 1.00 | |
| 90 # } | |
| 91 test_heuristic_try_job = ndb.JsonProperty(indexed=False, compressed=True) | |
| OLD | NEW |