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

Unified Diff: tools/android/loading/tracing.py

Issue 1707793002: sandwich: Refactor to use more existing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses benoit's comments Created 4 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 | « tools/android/loading/trace_recorder.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/tracing.py
diff --git a/tools/android/loading/tracing.py b/tools/android/loading/tracing.py
index cf79908608e418e0e43be2f7511ebdf82c6ebf81..54ff3d08d4b6cfa87a4da1c27307d432d0c97822 100644
--- a/tools/android/loading/tracing.py
+++ b/tools/android/loading/tracing.py
@@ -12,12 +12,17 @@ import operator
import devtools_monitor
+DEFAULT_CATEGORIES = None
+
+
class TracingTrack(devtools_monitor.Track):
"""Grabs and processes trace event messages.
See https://goo.gl/Qabkqk for details on the protocol.
"""
- def __init__(self, connection, categories=None, fetch_stream=False):
+ def __init__(self, connection,
+ categories=DEFAULT_CATEGORIES,
+ fetch_stream=False):
"""Initialize this TracingTrack.
Args:
@@ -304,6 +309,14 @@ class Event(object):
return self._tracing_event['ph']
@property
+ def category(self):
+ return self._tracing_event['cat']
+
+ @property
+ def pid(self):
+ return self._tracing_event['pid']
+
+ @property
def args(self):
return self._tracing_event.get('args', {})
« no previous file with comments | « tools/android/loading/trace_recorder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698