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

Side by Side Diff: appengine/findit/crash/azalea.py

Issue 2414523002: [Findit] Reorganizing findit_for_*.py (Closed)
Patch Set: trying to fix some tests 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
(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 crash.culprit import Culprit
6
7 class Azalea(object):
8 """The Main entry point into the Azalea library."""
9
10 def __init__(self, cl_classifier, component_classifier, project_classifier):
11 self.cl_classifier = cl_classifier
12 self.component_classifier = component_classifier
13 self.project_classifier = project_classifier
14
15 # TODO(wrengr): also detect the regression range, if needed.
Sharu Jiang 2016/10/12 17:46:29 Not needed, the regression range is already detect
16 def FindCulprit(self, report):
17 """Given a CrashReport, return a Culprit."""
18 suspected_cls = self.cl_classifier(report)
19
20 suspected_project = self.project_classifier.Classify(
21 suspected_cls, report.stacktrace.crash_stack)
22
23 suspected_components = self.component_classifier.Classify(
24 suspected_cls, report.stacktrace.crash_stack)
25
26 return Culprit(
27 project = suspected_project,
28 components = suspected_components,
29 cls = suspected_cls,
30 regression_range = report.regression_range,
31 algorithm = 'core_algorithm')
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/crash/changelist_classifier.py » ('j') | appengine/findit/crash/crash_pipeline.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698