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

Unified Diff: telemetry/telemetry/value/trace.py

Issue 2004103002: Make traces produced by telemetry combine all the trace parts (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: rebase Created 4 years, 7 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 | « telemetry/telemetry/timeline/trace_data_unittest.py ('k') | telemetry/telemetry/value/trace_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/value/trace.py
diff --git a/telemetry/telemetry/value/trace.py b/telemetry/telemetry/value/trace.py
index 6e8fccc09dea3933877be791c80047bb6004bf5a..76e603c8774141430a5a4d0eda3aa17c083678dd 100644
--- a/telemetry/telemetry/value/trace.py
+++ b/telemetry/telemetry/value/trace.py
@@ -36,16 +36,20 @@ class TraceValue(value_module.Value):
self._cloud_url = None
self._serialized_file_handle = None
+ def _GetTraceParts(self, trace_data):
+ return [trace_data.GetTraceFor(p)
+ for p in trace_data_module.ALL_TRACE_PARTS
+ if trace_data.HasTraceFor(p)]
+
def _GetTempFileHandle(self, trace_data):
if self.page:
title = self.page.display_name
else:
title = ''
content = StringIO.StringIO()
- trace2html.WriteHTMLForTraceDataToFile(
- [trace_data.GetTraceFor(trace_data_module.CHROME_TRACE_PART)],
- title,
- content)
+
+ trace2html.WriteHTMLForTraceDataToFile(self._GetTraceParts(trace_data),
+ title, content)
tf = tempfile.NamedTemporaryFile(delete=False, suffix='.html')
tf.write(content.getvalue().encode('utf-8'))
tf.close()
« no previous file with comments | « telemetry/telemetry/timeline/trace_data_unittest.py ('k') | telemetry/telemetry/value/trace_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698