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

Unified Diff: appengine/findit/crash/findit_for_crash.py

Issue 2075153003: [Findit] Add fracas analysis result feedback page. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nits. Created 4 years, 6 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/findit_for_crash.py
diff --git a/appengine/findit/crash/findit_for_crash.py b/appengine/findit/crash/findit_for_crash.py
index 1f7f52493ea0335b579fb2eff0e97453f4d2deed..9cd1949f92c5f68cc3ab714c7688502a5e626c2c 100644
--- a/appengine/findit/crash/findit_for_crash.py
+++ b/appengine/findit/crash/findit_for_crash.py
@@ -212,8 +212,7 @@ def FindItForCrash(stacktrace, regression_deps_rolls, crashed_deps,
crashed revision.
Returns:
- List of dicts of culprit results, sorted by confidence from highest to
- lowest.
+ List of Results, sorted by confidence from highest to lowest.
"""
if not regression_deps_rolls:
return []
@@ -249,10 +248,9 @@ def FindItForCrash(stacktrace, regression_deps_rolls, crashed_deps,
if not results:
return []
- sorted_results = sorted([result.ToDict() for result in results],
- key=lambda r: -r['confidence'])
+ sorted_results = sorted(results, key=lambda r: -r.confidence)
- if sorted_results[0]['confidence'] > 0.999:
+ if sorted_results[0].confidence > 0.999:
return sorted_results[:1]
return sorted_results[:3]
« no previous file with comments | « no previous file | appengine/findit/crash/fracas.py » ('j') | appengine/findit/handlers/crash/fracas_result_feedback.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698