Index: telemetry/telemetry/timeline/trace_event_importer.py |
diff --git a/telemetry/telemetry/timeline/trace_event_importer.py b/telemetry/telemetry/timeline/trace_event_importer.py |
index c909fb2a67fda5ce7ef0661f3f8450527b983119..e75b19ab8bc316fa4b6e040dbc6afd103355f404 100644 |
--- a/telemetry/telemetry/timeline/trace_event_importer.py |
+++ b/telemetry/telemetry/timeline/trace_event_importer.py |
@@ -9,7 +9,6 @@ https://code.google.com/p/trace-viewer/ |
import collections |
import copy |
-import json |
import telemetry.timeline.async_slice as tracing_async_slice |
import telemetry.timeline.flow_event as tracing_flow_event |
@@ -33,25 +32,6 @@ class TraceEventTimelineImporter(importer.TimelineImporter): |
self._events = [] |
self._metadata = [] |
for trace in trace_data.GetTracesFor(trace_data_module.CHROME_TRACE_PART): |
- if isinstance(trace, trace_data_module.TraceFileHandle): |
- trace_handle = trace |
- file_path = trace_handle.file_path |
- try: |
- with open(file_path, 'r') as f: |
- trace = json.load(f) |
- finally: |
- # HACK: during the effort of converting chrome trace's representation |
- # from in-memory to disk, we need to either: |
- # 1) Audit all the clients of python trace importer to explictly |
- # cleaned up the trace handle after use. |
- # 2) Clean up the trace handle for them. |
- # We decide to clean up the trace handle for them here (option 2) as |
- # it's lots of work to fix all the call sites. Once all the trace |
- # converting code are converted to use the Javascript engine, this |
- # problem also goes away as we only have a single trace parser |
- # engine. |
- # https://bugs.chromium.org/p/chromium/issues/detail?id=682355 |
- trace_handle.Clean() |
self._events.extend(trace['traceEvents']) |
self.CollectMetadataRecords(trace) |