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

Unified Diff: systrace/profile_chrome/chrome_tracing_agent.py

Issue 2712163002: [Systrace] Fix systrace clock syncing issue with BattOr. (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
Index: systrace/profile_chrome/chrome_tracing_agent.py
diff --git a/systrace/profile_chrome/chrome_tracing_agent.py b/systrace/profile_chrome/chrome_tracing_agent.py
index 1e8895bd2354fb714515181495fff0c86aeb7d1e..5967ad137e59bc41533b6428d999eccf7c34831f 100644
--- a/systrace/profile_chrome/chrome_tracing_agent.py
+++ b/systrace/profile_chrome/chrome_tracing_agent.py
@@ -12,6 +12,7 @@ from devil.android import device_errors
from devil.android.sdk import intent
from systrace import trace_result
from systrace import tracing_agents
+from telemetry.timeline import trace_data as trace_data_module
DEFAULT_CHROME_CATEGORIES = '_DEFAULT_CHROME_CATEGORIES'
@@ -110,6 +111,11 @@ class ChromeTracingAgent(tracing_agents.TracingAgent):
trace_data = f.read()
return trace_result.TraceResult('traceEvents', trace_data)
+ def CollectAgentTraceData(self, trace_data_builder):
+ with open(self._PullTrace(), 'r') as f:
+ data = f.read()
+ trace_data_builder.AddTraceFor(trace_data_module.CHROME_TRACE_PART, data)
+
def _PullTrace(self):
trace_file = self._trace_file.replace('/storage/emulated/0/', '/sdcard/')
host_file = os.path.join(os.path.curdir, os.path.basename(trace_file))

Powered by Google App Engine
This is Rietveld 408576698