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

Side by Side Diff: tools/telemetry/telemetry/core/browser.py

Issue 18440003: telemetry: Added timeout parameter to StartTracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed default timeout to DEFAULT_WEB_CONTENTS_TIMEOUT Created 7 years, 5 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/telemetry/telemetry/core/chrome/browser_backend.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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 4
5 import os 5 import os
6 6
7 from telemetry.core import browser_credentials 7 from telemetry.core import browser_credentials
8 from telemetry.core import extension_dict 8 from telemetry.core import extension_dict
9 from telemetry.core import platform 9 from telemetry.core import platform
10 from telemetry.core import tab_list 10 from telemetry.core import tab_list
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 self._active_profilers.append( 206 self._active_profilers.append(
207 profiler_class(self._browser_backend, self._platform_backend, 207 profiler_class(self._browser_backend, self._platform_backend,
208 base_output_file)) 208 base_output_file))
209 209
210 def StopProfiling(self): 210 def StopProfiling(self):
211 """Stops all active profilers and saves their results.""" 211 """Stops all active profilers and saves their results."""
212 for profiler in self._active_profilers: 212 for profiler in self._active_profilers:
213 profiler.CollectProfile() 213 profiler.CollectProfile()
214 self._active_profilers = [] 214 self._active_profilers = []
215 215
216 def StartTracing(self, custom_categories=None): 216 def StartTracing(self, custom_categories=None, timeout=10):
217 return self._browser_backend.StartTracing(custom_categories) 217 return self._browser_backend.StartTracing(custom_categories, timeout)
218 218
219 def StopTracing(self): 219 def StopTracing(self):
220 return self._browser_backend.StopTracing() 220 return self._browser_backend.StopTracing()
221 221
222 def GetTraceResultAndReset(self): 222 def GetTraceResultAndReset(self):
223 """Returns the result of the trace, as TraceResult object.""" 223 """Returns the result of the trace, as TraceResult object."""
224 return self._browser_backend.GetTraceResultAndReset() 224 return self._browser_backend.GetTraceResultAndReset()
225 225
226 def Close(self): 226 def Close(self):
227 """Closes this browser.""" 227 """Closes this browser."""
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 use_record_mode, 283 use_record_mode,
284 append_to_existing_wpr, 284 append_to_existing_wpr,
285 self._browser_backend.WEBPAGEREPLAY_HOST, 285 self._browser_backend.WEBPAGEREPLAY_HOST,
286 self._browser_backend.webpagereplay_local_http_port, 286 self._browser_backend.webpagereplay_local_http_port,
287 self._browser_backend.webpagereplay_local_https_port, 287 self._browser_backend.webpagereplay_local_https_port,
288 self._browser_backend.webpagereplay_remote_http_port, 288 self._browser_backend.webpagereplay_remote_http_port,
289 self._browser_backend.webpagereplay_remote_https_port) 289 self._browser_backend.webpagereplay_remote_https_port)
290 290
291 def GetStandardOutput(self): 291 def GetStandardOutput(self):
292 return self._browser_backend.GetStandardOutput() 292 return self._browser_backend.GetStandardOutput()
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/chrome/browser_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698