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

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

Issue 2243673002: [Findit] Added algorithm to analysis (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: gclient sync Created 4 years, 4 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
« no previous file with comments | « appengine/findit/model/base_analysis.py ('k') | appengine/findit/templates/flake/result.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 from google.appengine.ext import ndb 5 from google.appengine.ext import ndb
6 6
7 from model import analysis_status
8 from model.base_build_model import BaseBuildModel 7 from model.base_build_model import BaseBuildModel
9 from model.base_analysis import BaseAnalysis 8 from model.base_analysis import BaseAnalysis
10 from model.flake.flake_swarming_task import FlakeSwarmingTask 9 from model.flake.flake_swarming_task import FlakeSwarmingTask
11 10
11
12 class MasterFlakeAnalysis(BaseAnalysis, BaseBuildModel): 12 class MasterFlakeAnalysis(BaseAnalysis, BaseBuildModel):
13 """Represents an analysis of a flaky test in a Chromium Waterfall.""" 13 """Represents an analysis of a flaky test in a Chromium Waterfall."""
14
14 @staticmethod 15 @staticmethod
15 def CreateAnalysisId(master_name, builder_name, 16 def CreateAnalysisId(master_name, builder_name,
16 build_number, step_name, test_name): 17 build_number, step_name, test_name):
17 return '%s/%s/%s/%s/%s' % (master_name, builder_name, 18 return '%s/%s/%s/%s/%s' % (master_name, builder_name,
18 build_number, step_name, test_name) 19 build_number, step_name, test_name)
19 20
20 @ndb.ComputedProperty 21 @ndb.ComputedProperty
21 def step_name(self): 22 def step_name(self):
22 return self.key.pairs()[0][1].split('/')[3] 23 return self.key.pairs()[0][1].split('/')[3]
23 24
(...skipping 22 matching lines...) Expand all
46 step_name, test_name): # pragma: no cover 47 step_name, test_name): # pragma: no cover
47 return MasterFlakeAnalysis._CreateKey( 48 return MasterFlakeAnalysis._CreateKey(
48 master_name, builder_name, build_number, step_name, test_name).get() 49 master_name, builder_name, build_number, step_name, test_name).get()
49 50
50 # List of tested build_numbers and their corresponding success rates. 51 # List of tested build_numbers and their corresponding success rates.
51 # We need to keep these sorted manually. 52 # We need to keep these sorted manually.
52 build_numbers = ndb.IntegerProperty(indexed=True, repeated=True) 53 build_numbers = ndb.IntegerProperty(indexed=True, repeated=True)
53 success_rates = ndb.FloatProperty(indexed=False, repeated=True) 54 success_rates = ndb.FloatProperty(indexed=False, repeated=True)
54 flake_swarming_tasks = ndb.KeyProperty( 55 flake_swarming_tasks = ndb.KeyProperty(
55 kind='FlakeSwarmingTask', repeated=True) 56 kind='FlakeSwarmingTask', repeated=True)
57 suspected_flake_build_number = ndb.IntegerProperty()
OLDNEW
« no previous file with comments | « appengine/findit/model/base_analysis.py ('k') | appengine/findit/templates/flake/result.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698