176 lines
9.7 KiB
HTML
176 lines
9.7 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module telemetry.core.browser</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.core.html"><font color="#ffffff">core</font></a>.browser</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/browser.py">telemetry/core/browser.py</a></font></td></tr></table>
|
|
<p><tt># Copyright (c) 2012 The Chromium Authors. All rights reserved.<br>
|
|
# Use of this source code is governed by a BSD-style license that can be<br>
|
|
# found in the LICENSE file.</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.chrome.browser_backend.html">telemetry.core.chrome.browser_backend</a><br>
|
|
<a href="telemetry.core.browser_credentials.html">telemetry.core.browser_credentials</a><br>
|
|
<a href="telemetry.core.extension_dict.html">telemetry.core.extension_dict</a><br>
|
|
</td><td width="25%" valign=top><a href="os.html">os</a><br>
|
|
<a href="telemetry.core.platform.html">telemetry.core.platform</a><br>
|
|
<a href="telemetry.core.platform.profiler.profiler_finder.html">telemetry.core.platform.profiler.profiler_finder</a><br>
|
|
</td><td width="25%" valign=top><a href="telemetry.core.tab_list.html">telemetry.core.tab_list</a><br>
|
|
<a href="telemetry.core.temporary_http_server.html">telemetry.core.temporary_http_server</a><br>
|
|
<a href="telemetry.core.wpr_modes.html">telemetry.core.wpr_modes</a><br>
|
|
</td><td width="25%" valign=top><a href="telemetry.core.wpr_server.html">telemetry.core.wpr_server</a><br>
|
|
</td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="telemetry.core.browser.html#Browser">Browser</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Browser">class <strong>Browser</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A running browser instance that can be controlled in a limited way.<br>
|
|
<br>
|
|
To create a browser instance, use browser_finder.FindBrowser.<br>
|
|
<br>
|
|
Be sure to clean up after yourself by calling <a href="#Browser-Close">Close</a>() when you are done with<br>
|
|
the browser. Or better yet:<br>
|
|
browser_to_create = FindBrowser(options)<br>
|
|
with browser_to_create.Create() as browser:<br>
|
|
... do all your operations on browser here<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="Browser-Close"><strong>Close</strong></a>(self)</dt><dd><tt>Closes this browser.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Browser-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-GetTraceResultAndReset"><strong>GetTraceResultAndReset</strong></a>(self)</dt><dd><tt>Returns the result of the trace, as TraceResult <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Browser-SetHTTPServerDirectories"><strong>SetHTTPServerDirectories</strong></a>(self, paths)</dt><dd><tt>Returns True if the HTTP server was started, False otherwise.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Browser-SetReplayArchivePath"><strong>SetReplayArchivePath</strong></a>(self, archive_path, append_to_existing_wpr<font color="#909090">=False</font>, make_javascript_deterministic<font color="#909090">=True</font>)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-StartProfiling"><strong>StartProfiling</strong></a>(self, options, base_output_file)</dt><dd><tt>Starts profiling using |options|.profiler_tool. Results are saved to<br>
|
|
|base_output_file|.<process_name>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Browser-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>, timeout<font color="#909090">=10</font>)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-StopProfiling"><strong>StopProfiling</strong></a>(self)</dt><dd><tt>Stops all active profilers and saves their results.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Browser-StopTracing"><strong>StopTracing</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-__enter__"><strong>__enter__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-__exit__"><strong>__exit__</strong></a>(self, *args)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-__init__"><strong>__init__</strong></a>(self, backend, platform_backend)</dt></dl>
|
|
|
|
<dl><dt><a name="Browser-is_profiler_active"><strong>is_profiler_active</strong></a>(self, profiler_name)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>browser_type</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>extensions</strong></dt>
|
|
<dd><tt>Returns the extension dictionary if it exists.</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>http_server</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>io_stats</strong></dt>
|
|
<dd><tt>Returns a dict of IO statistics for the browser:<br>
|
|
{ 'Browser': {<br>
|
|
'ReadOperationCount': W,<br>
|
|
'WriteOperationCount': X,<br>
|
|
'ReadTransferCount': Y,<br>
|
|
'WriteTransferCount': Z<br>
|
|
},<br>
|
|
'Gpu': {<br>
|
|
'ReadOperationCount': W,<br>
|
|
'WriteOperationCount': X,<br>
|
|
'ReadTransferCount': Y,<br>
|
|
'WriteTransferCount': Z<br>
|
|
},<br>
|
|
'Renderer': {<br>
|
|
'ReadOperationCount': W,<br>
|
|
'WriteOperationCount': X,<br>
|
|
'ReadTransferCount': Y,<br>
|
|
'WriteTransferCount': Z<br>
|
|
}<br>
|
|
}</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>is_content_shell</strong></dt>
|
|
<dd><tt>Returns whether this browser is a content shell, only.</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>memory_stats</strong></dt>
|
|
<dd><tt>Returns a dict of memory statistics for the browser:<br>
|
|
{ 'Browser': {<br>
|
|
'VM': S,<br>
|
|
'VMPeak': T,<br>
|
|
'WorkingSetSize': U,<br>
|
|
'WorkingSetSizePeak': V,<br>
|
|
'ProportionalSetSize': W,<br>
|
|
'PrivateDirty': X<br>
|
|
},<br>
|
|
'Gpu': {<br>
|
|
'VM': S,<br>
|
|
'VMPeak': T,<br>
|
|
'WorkingSetSize': U,<br>
|
|
'WorkingSetSizePeak': V,<br>
|
|
'ProportionalSetSize': W,<br>
|
|
'PrivateDirty': X<br>
|
|
},<br>
|
|
'Renderer': {<br>
|
|
'VM': S,<br>
|
|
'VMPeak': T,<br>
|
|
'WorkingSetSize': U,<br>
|
|
'WorkingSetSizePeak': V,<br>
|
|
'ProportionalSetSize': W,<br>
|
|
'PrivateDirty': X<br>
|
|
},<br>
|
|
'SystemCommitCharge': Y,<br>
|
|
'ProcessCount': Z,<br>
|
|
}<br>
|
|
Any of the above keys may be missing on a per-platform basis.</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>platform</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>supports_extensions</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>supports_tab_control</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>supports_tracing</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>tabs</strong></dt>
|
|
</dl>
|
|
</td></tr></table></td></tr></table>
|
|
</body></html> |