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

Side by Side Diff: appengine/findit/model/flake/master_flake_analysis.py

Issue 2411893002: [Findit] Adding metadata for manually vs automatically triggered flake analyses (Closed)
Patch Set: Created 4 years, 2 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 base64 5 import base64
6 6
7 from google.appengine.ext import ndb 7 from google.appengine.ext import ndb
8 8
9 from model import analysis_status
10 from model.base_analysis import BaseAnalysis 9 from model.base_analysis import BaseAnalysis
11 from model.base_build_model import BaseBuildModel 10 from model.base_build_model import BaseBuildModel
12 from model.flake.flake_swarming_task import FlakeSwarmingTaskData 11 from model.flake.flake_swarming_task import FlakeSwarmingTaskData
13 from model.versioned_model import VersionedModel 12 from model.versioned_model import VersionedModel
13 from waterfall.flake import triggering_sources
14 14
15 15
16 class DataPoint(ndb.Model): 16 class DataPoint(ndb.Model):
17 build_number = ndb.IntegerProperty(indexed=False) 17 build_number = ndb.IntegerProperty(indexed=False)
18 pass_rate = ndb.FloatProperty(indexed=False) 18 pass_rate = ndb.FloatProperty(indexed=False)
19 19
20 20
21 class MasterFlakeAnalysis(BaseAnalysis, BaseBuildModel, VersionedModel): 21 class MasterFlakeAnalysis(BaseAnalysis, BaseBuildModel, VersionedModel):
22 """Represents an analysis of a flaky test on a Waterfall test cycle.""" 22 """Represents an analysis of a flaky test on a Waterfall test cycle."""
23 23
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 # 'upper_flake_threshold': 0.98 105 # 'upper_flake_threshold': 0.98
106 # } 106 # }
107 algorithm_parameters = ndb.JsonProperty(indexed=False) 107 algorithm_parameters = ndb.JsonProperty(indexed=False)
108 108
109 # The suspected build number to have introduced the flakiness. 109 # The suspected build number to have introduced the flakiness.
110 suspected_flake_build_number = ndb.IntegerProperty() 110 suspected_flake_build_number = ndb.IntegerProperty()
111 111
112 # The data points used to plot the flakiness graph build over build. 112 # The data points used to plot the flakiness graph build over build.
113 data_points = ndb.LocalStructuredProperty( 113 data_points = ndb.LocalStructuredProperty(
114 DataPoint, repeated=True, compressed=True) 114 DataPoint, repeated=True, compressed=True)
115
116 # Whether the analysis was triggered by a manual request through check flake,
117 # Findit's automatic analysis upon detection, or Findit API.
118 triggering_source = ndb.IntegerProperty(
119 default=triggering_sources.FINDIT, indexed=True)
stgao 2016/10/13 06:14:38 The default value is not true for legacy data. May
lijeffrey 2016/10/14 23:45:21 Done.
120
121 # Who triggered the analysis. Used for differentiating between manual and
122 # automatic runs, and determining the most active users to gather feedback.
123 triggering_user_email = ndb.StringProperty(default=None, indexed=False)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698