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

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

Issue 2707603002: [Predator] Generate all changelogs in regression ranges instead of only matched changelogs (Closed)
Patch Set: . Created 3 years, 10 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
« no previous file with comments | « appengine/findit/crash/scorers/top_frame_index.py ('k') | appengine/findit/crash/suspect.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/stacktrace.py
diff --git a/appengine/findit/crash/stacktrace.py b/appengine/findit/crash/stacktrace.py
index d9cac810c24ef086bc17b4c1dd7cac973a9b7130..a221c15bc62ffcf4b652948091572ada011dcd0f 100644
--- a/appengine/findit/crash/stacktrace.py
+++ b/appengine/findit/crash/stacktrace.py
@@ -27,6 +27,20 @@ FRAME_INDEX_PATTERN = re.compile(r'\s*#(\d+)\s.*')
_DEFAULT_FORMAT_TYPE = CallStackFormatType.DEFAULT
+# TODO(wrengr): it's not clear why the ``priority`` is stored at all,
+# given that every use in this file discards it. ``Result.file_to_stack_infos``
+# should just store pointers directly to the frames themselves rather
+# than needing this intermediate object.
+# TODO(http://crbug.com/644476): this class needs a better name.
+class StackInfo(namedtuple('StackInfo', ['frame', 'priority'])):
+ """Pair of a frame and the ``priority`` of the ``CallStack`` it came from."""
+ __slots__ = ()
+
+ def __str__(self): # pragma: no cover
+ return ('%s(frame = %s, priority = %f)'
+ % (self.__class__.__name__, self.frame, self.priority))
+
+
class StackFrame(namedtuple('StackFrame',
['index', 'dep_path', 'function', 'file_path', 'raw_file_path',
'crashed_line_numbers', 'repo_url'])):
« no previous file with comments | « appengine/findit/crash/scorers/top_frame_index.py ('k') | appengine/findit/crash/suspect.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698