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

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: 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
Index: tools/android/loading/tracing.py
diff --git a/tools/android/loading/tracing.py b/tools/android/loading/tracing.py
index 7071011796de5cfc6e536b42e57616c793657399..caaba816ec33c2bc6451bfab90abd9c003572b8c 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
mattcary 2016/02/19 14:41:05 What's the point of creating this? Seems just to b
gabadie 2016/02/19 15:04:35 Ensure consistency with the callers that can optio
+
+
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,18 @@ class Event(object):
return self._tracing_event['ph']
@property
+ def category(self):
+ return self._tracing_event['cat']
+
+ @property
+ def name(self):
+ return self._tracing_event['name']
+
+ @property
+ def pid(self):
+ return self._tracing_event['pid']
+
+ @property
def args(self):
return self._tracing_event.get('args', {})
« tools/android/loading/run_sandwich.py ('K') | « tools/android/loading/trace_recorder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698