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

Side by Side Diff: appengine/findit/crash/scorers/top_frame_index.py

Issue 2157433002: [Findit] Pass changed files info to Fracas, 2 face design. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nits. Created 4 years, 5 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 """TopFrameIndex scorer applies to all Result objects. 5 """TopFrameIndex scorer applies to all Result objects.
6 6
7 It represents a heuristic rule: 7 It represents a heuristic rule:
8 The less the top frame index (this result changed) is, the higher score. 8 The less the top frame index (this result changed) is, the higher score.
9 """ 9 """
10 10
(...skipping 22 matching lines...) Expand all
33 33
34 def Score(self, top_frame_index): 34 def Score(self, top_frame_index):
35 # TODO(katesonia): experiment the model and parameters later. 35 # TODO(katesonia): experiment the model and parameters later.
36 if top_frame_index < self.max_top_n: 36 if top_frame_index < self.max_top_n:
37 return 1 - top_frame_index / float(self.max_top_n) 37 return 1 - top_frame_index / float(self.max_top_n)
38 38
39 return 0 39 return 0
40 40
41 def Reason(self, top_frame_index, score): 41 def Reason(self, top_frame_index, score):
42 if score == 0: 42 if score == 0:
43 return '' 43 return None
44 44
45 return 'Modified top crashing frame is #%d' % top_frame_index 45 return self.name, score, 'Top frame is #%d' % top_frame_index
46
47 def ChangedFiles(self, result):
48 # There is no changed file infos that top frame scorer can provide.
49 return None
OLDNEW
« no previous file with comments | « appengine/findit/crash/scorers/test/top_frame_index_test.py ('k') | appengine/findit/crash/test/callstack_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698