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

Side by Side Diff: tools/chrome_proxy/common/inspector_network.py

Issue 2741533003: [Telemetry] Move from telemetry/trace_data to tracing/trace_data in chromium (Closed)
Patch Set: renable test Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/PRESUBMIT.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import logging 4 import logging
5 5
6 from telemetry.core import exceptions 6 from telemetry.core import exceptions
7 from telemetry.timeline import trace_data
8 from telemetry.timeline import model 7 from telemetry.timeline import model
8 from tracing.trace_data import trace_data
9 9
10 10
11 class InspectorNetworkException(Exception): 11 class InspectorNetworkException(Exception):
12 pass 12 pass
13 13
14 14
15 class InspectorNetworkResponseData(object): 15 class InspectorNetworkResponseData(object):
16 def __init__(self, inspector_network, params, initiator): 16 def __init__(self, inspector_network, params, initiator):
17 """Creates a new InspectorNetworkResponseData instance. 17 """Creates a new InspectorNetworkResponseData instance.
18 18
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 return None 286 return None
287 responses = self._inspector_network.GetResponseData() 287 responses = self._inspector_network.GetResponseData()
288 events = [r.AsTimelineEvent() for r in list(responses)] 288 events = [r.AsTimelineEvent() for r in list(responses)]
289 self._inspector_network.StopMonitoringNetwork() 289 self._inspector_network.StopMonitoringNetwork()
290 self._is_recording = False 290 self._is_recording = False
291 if len(events) == 0: 291 if len(events) == 0:
292 return None 292 return None
293 builder = trace_data.TraceDataBuilder() 293 builder = trace_data.TraceDataBuilder()
294 builder.AddTraceFor(trace_data.INSPECTOR_TRACE_PART, events) 294 builder.AddTraceFor(trace_data.INSPECTOR_TRACE_PART, events)
295 return model.TimelineModel(builder.AsData(), shift_world_to_zero=False) 295 return model.TimelineModel(builder.AsData(), shift_world_to_zero=False)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698