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

Unified Diff: systrace/profile_chrome/chrome_startup_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
« no previous file with comments | « no previous file | systrace/profile_chrome/chrome_tracing_agent.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« no previous file with comments | « no previous file | systrace/profile_chrome/chrome_tracing_agent.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698