1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3 <html><head><title>Python: module telemetry.core.browser</title> 4 </head><body bgcolor="#f0f0f8"> 5 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 7 <tr bgcolor="#7799ee"> 8 <td valign=bottom> <br> 9 <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 10 ><td align=right valign=bottom 11 ><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> 12 <p><tt># Copyright (c) 2012 The Chromium Authors. All rights reserved.<br> 13 # Use of this source code is governed by a BSD-style license that can be<br> 14 # found in the LICENSE file.</tt></p> 15 <p> 16 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 17 <tr bgcolor="#aa55cc"> 18 <td colspan=3 valign=bottom> <br> 19 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 20 21 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 22 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.backends.browser_backend.html">telemetry.core.backends.browser_backend</a><br> 23 <a href="telemetry.core.browser_credentials.html">telemetry.core.browser_credentials</a><br> 24 <a href="telemetry.decorators.html">telemetry.decorators</a><br> 25 <a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> 26 </td><td width="25%" valign=top><a href="telemetry.core.extension_dict.html">telemetry.core.extension_dict</a><br> 27 <a href="telemetry.core.local_server.html">telemetry.core.local_server</a><br> 28 <a href="telemetry.core.memory_cache_http_server.html">telemetry.core.memory_cache_http_server</a><br> 29 <a href="os.html">os</a><br> 30 </td><td width="25%" valign=top><a href="telemetry.core.platform.html">telemetry.core.platform</a><br> 31 <a href="telemetry.core.platform.profiler.profiler_finder.html">telemetry.core.platform.profiler.profiler_finder</a><br> 32 <a href="telemetry.core.tab_list.html">telemetry.core.tab_list</a><br> 33 <a href="telemetry.core.wpr_modes.html">telemetry.core.wpr_modes</a><br> 34 </td><td width="25%" valign=top><a href="telemetry.core.wpr_server.html">telemetry.core.wpr_server</a><br> 35 </td></tr></table></td></tr></table><p> 36 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 37 <tr bgcolor="#ee77aa"> 38 <td colspan=3 valign=bottom> <br> 39 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 40 41 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 42 <td width="100%"><dl> 43 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 44 </font></dt><dd> 45 <dl> 46 <dt><font face="helvetica, arial"><a href="telemetry.core.browser.html#Browser">Browser</a> 47 </font></dt></dl> 48 </dd> 49 </dl> 50 <p> 51 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 52 <tr bgcolor="#ffc8d8"> 53 <td colspan=3 valign=bottom> <br> 54 <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> 55 56 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 57 <td colspan=2><tt>A running browser instance that can be controlled in a limited way.<br> 58 <br> 59 To create a browser instance, use browser_finder.FindBrowser.<br> 60 <br> 61 Be sure to clean up after yourself by calling <a href="#Browser-Close">Close</a>() when you are done with<br> 62 the browser. Or better yet:<br> 63 browser_to_create = FindBrowser(options)<br> 64 with browser_to_create.Create() as browser:<br> 65 ... do all your operations on browser here<br> </tt></td></tr> 66 <tr><td> </td> 67 <td width="100%">Methods defined here:<br> 68 <dl><dt><a name="Browser-Close"><strong>Close</strong></a>(self)</dt><dd><tt>Closes this browser.</tt></dd></dl> 69 70 <dl><dt><a name="Browser-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> 71 72 <dl><dt><a name="Browser-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> 73 74 <dl><dt><a name="Browser-GetSystemInfo"><strong>GetSystemInfo</strong></a>(self)</dt><dd><tt>Returns low-level information about the system, if available.<br> 75 <br> 76 See the documentation of the SystemInfo class for more details.</tt></dd></dl> 77 78 <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> 79 80 <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> 81 82 <dl><dt><a name="Browser-Start"><strong>Start</strong></a>(self)</dt></dl> 83 84 <dl><dt><a name="Browser-StartLocalServer"><strong>StartLocalServer</strong></a>(self, server)</dt><dd><tt>Starts a LocalServer and associates it with this browser.<br> 85 <br> 86 It will be closed when the browser closes.</tt></dd></dl> 87 88 <dl><dt><a name="Browser-StartProfiling"><strong>StartProfiling</strong></a>(self, profiler_name, base_output_file)</dt><dd><tt>Starts profiling using |profiler_name|. Results are saved to<br> 89 |base_output_file|.<process_name>.</tt></dd></dl> 90 91 <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> 92 93 <dl><dt><a name="Browser-StopProfiling"><strong>StopProfiling</strong></a>(self)</dt><dd><tt>Stops all active profilers and saves their results.<br> 94 <br> 95 Returns:<br> 96 A list of filenames produced by the profiler.</tt></dd></dl> 97 98 <dl><dt><a name="Browser-StopTracing"><strong>StopTracing</strong></a>(self)</dt><dd><tt>Stops tracing and returns the result as TimelineData <a href="__builtin__.html#object">object</a>.</tt></dd></dl> 99 100 <dl><dt><a name="Browser-__enter__"><strong>__enter__</strong></a>(self)</dt></dl> 101 102 <dl><dt><a name="Browser-__exit__"><strong>__exit__</strong></a>(self, *args)</dt></dl> 103 104 <dl><dt><a name="Browser-__init__"><strong>__init__</strong></a>(self, backend, platform_backend)</dt></dl> 105 106 <dl><dt><a name="Browser-is_profiler_active"><strong>is_profiler_active</strong></a>(self, profiler_name)</dt></dl> 107 108 <hr> 109 Data descriptors defined here:<br> 110 <dl><dt><strong>__dict__</strong></dt> 111 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 112 </dl> 113 <dl><dt><strong>__weakref__</strong></dt> 114 <dd><tt>list of weak references to the object (if defined)</tt></dd> 115 </dl> 116 <dl><dt><strong>browser_type</strong></dt> 117 </dl> 118 <dl><dt><strong>cpu_stats</strong></dt> 119 <dd><tt>Returns a dict of cpu statistics for the system.<br> 120 { 'Browser': {<br> 121 'CpuProcessTime': S,<br> 122 'TotalTime': T<br> 123 },<br> 124 'Gpu': {<br> 125 'CpuProcessTime': S,<br> 126 'TotalTime': T<br> 127 },<br> 128 'Renderer': {<br> 129 'CpuProcessTime': S,<br> 130 'TotalTime': T<br> 131 }<br> 132 }<br> 133 Any of the above keys may be missing on a per-platform basis.</tt></dd> 134 </dl> 135 <dl><dt><strong>extensions</strong></dt> 136 </dl> 137 <dl><dt><strong>foreground_tab</strong></dt> 138 </dl> 139 <dl><dt><strong>http_server</strong></dt> 140 </dl> 141 <dl><dt><strong>io_stats</strong></dt> 142 <dd><tt>Returns a dict of IO statistics for the browser:<br> 143 { 'Browser': {<br> 144 'ReadOperationCount': W,<br> 145 'WriteOperationCount': X,<br> 146 'ReadTransferCount': Y,<br> 147 'WriteTransferCount': Z<br> 148 },<br> 149 'Gpu': {<br> 150 'ReadOperationCount': W,<br> 151 'WriteOperationCount': X,<br> 152 'ReadTransferCount': Y,<br> 153 'WriteTransferCount': Z<br> 154 },<br> 155 'Renderer': {<br> 156 'ReadOperationCount': W,<br> 157 'WriteOperationCount': X,<br> 158 'ReadTransferCount': Y,<br> 159 'WriteTransferCount': Z<br> 160 }<br> 161 }</tt></dd> 162 </dl> 163 <dl><dt><strong>is_content_shell</strong></dt> 164 <dd><tt>Returns whether this browser is a content shell, only.</tt></dd> 165 </dl> 166 <dl><dt><strong>is_tracing_running</strong></dt> 167 </dl> 168 <dl><dt><strong>local_servers</strong></dt> 169 <dd><tt>Returns the currently running local servers.</tt></dd> 170 </dl> 171 <dl><dt><strong>memory_stats</strong></dt> 172 <dd><tt>Returns a dict of memory statistics for the browser:<br> 173 { 'Browser': {<br> 174 'VM': R,<br> 175 'VMPeak': S,<br> 176 'WorkingSetSize': T,<br> 177 'WorkingSetSizePeak': U,<br> 178 'ProportionalSetSize': V,<br> 179 'PrivateDirty': W<br> 180 },<br> 181 'Gpu': {<br> 182 'VM': R,<br> 183 'VMPeak': S,<br> 184 'WorkingSetSize': T,<br> 185 'WorkingSetSizePeak': U,<br> 186 'ProportionalSetSize': V,<br> 187 'PrivateDirty': W<br> 188 },<br> 189 'Renderer': {<br> 190 'VM': R,<br> 191 'VMPeak': S,<br> 192 'WorkingSetSize': T,<br> 193 'WorkingSetSizePeak': U,<br> 194 'ProportionalSetSize': V,<br> 195 'PrivateDirty': W<br> 196 },<br> 197 'SystemCommitCharge': X,<br> 198 'SystemTotalPhysicalMemory': Y,<br> 199 'ProcessCount': Z,<br> 200 }<br> 201 Any of the above keys may be missing on a per-platform basis.</tt></dd> 202 </dl> 203 <dl><dt><strong>platform</strong></dt> 204 </dl> 205 <dl><dt><strong>supports_extensions</strong></dt> 206 </dl> 207 <dl><dt><strong>supports_system_info</strong></dt> 208 </dl> 209 <dl><dt><strong>supports_tab_control</strong></dt> 210 </dl> 211 <dl><dt><strong>supports_tracing</strong></dt> 212 </dl> 213 <dl><dt><strong>synthetic_gesture_source_type</strong></dt> 214 </dl> 215 <dl><dt><strong>tabs</strong></dt> 216 </dl> 217 </td></tr></table></td></tr></table> 218 </body></html>