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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: appengine/findit/crash/azalea.py
diff --git a/appengine/findit/crash/azalea.py b/appengine/findit/crash/azalea.py
new file mode 100644
index 0000000000000000000000000000000000000000..1789eddf965cbc4b78c67598606672cb1457ebee
--- /dev/null
+++ b/appengine/findit/crash/azalea.py
@@ -0,0 +1,31 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from crash.culprit import Culprit
+
+class Azalea(object):
+ """The Main entry point into the Azalea library."""
+
+ def __init__(self, cl_classifier, component_classifier, project_classifier):
+ self.cl_classifier = cl_classifier
+ self.component_classifier = component_classifier
+ self.project_classifier = project_classifier
+
+ # 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
+ def FindCulprit(self, report):
+ """Given a CrashReport, return a Culprit."""
+ suspected_cls = self.cl_classifier(report)
+
+ suspected_project = self.project_classifier.Classify(
+ suspected_cls, report.stacktrace.crash_stack)
+
+ suspected_components = self.component_classifier.Classify(
+ suspected_cls, report.stacktrace.crash_stack)
+
+ return Culprit(
+ project = suspected_project,
+ components = suspected_components,
+ cls = suspected_cls,
+ regression_range = report.regression_range,
+ algorithm = 'core_algorithm')
« 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