Index: systrace/profile_chrome/chrome_startup_tracing_agent.py |
diff --git a/systrace/profile_chrome/chrome_startup_tracing_agent.py b/systrace/profile_chrome/chrome_startup_tracing_agent.py |
index a133a465f255b410c3b3bd24360e04cebc281520..a219ae1a7702fd28e493ebf32c29fab8449b4bd7 100644 |
--- a/systrace/profile_chrome/chrome_startup_tracing_agent.py |
+++ b/systrace/profile_chrome/chrome_startup_tracing_agent.py |
@@ -10,9 +10,9 @@ import re |
from devil.android import flag_changer |
from devil.android.perf import cache_control |
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 |
rnephew (Reviews Here)
2017/02/24 17:21:26
I eventually would like to move this out of teleme
|
class ChromeStartupTracingAgent(tracing_agents.TracingAgent): |
@@ -77,6 +77,11 @@ class ChromeStartupTracingAgent(tracing_agents.TracingAgent): |
trace_data = f.read() |
return trace_result.TraceResult('traceEvents', trace_data) |
+ def CollectAgentTraceData(self, trace_data_builder): |
rnephew (Reviews Here)
2017/02/24 17:21:26
Made changes to make it operate more like the trac
|
+ 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)) |