1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.internal.backends.chrome_inspector.inspector_memory</title>
4<meta charset="utf-8">
5</head><body bgcolor="#f0f0f8">
6
7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
8<tr bgcolor="#7799ee">
9<td valign=bottom>&nbsp;<br>
10<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.backends.html"><font color="#ffffff">backends</font></a>.<a href="telemetry.internal.backends.chrome_inspector.html"><font color="#ffffff">chrome_inspector</font></a>.inspector_memory</strong></big></big></font></td
11><td align=right valign=bottom
12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/backends/chrome_inspector/inspector_memory.py">telemetry/internal/backends/chrome_inspector/inspector_memory.py</a></font></td></tr></table>
13    <p><tt>#&nbsp;Copyright&nbsp;2013&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
14#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
15#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
16<p>
17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
18<tr bgcolor="#aa55cc">
19<td colspan=3 valign=bottom>&nbsp;<br>
20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
21
22<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br>
24</td><td width="25%" valign=top><a href="json.html">json</a><br>
25</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
26<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
27<tr bgcolor="#ee77aa">
28<td colspan=3 valign=bottom>&nbsp;<br>
29<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
30
31<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
32<td width="100%"><dl>
33<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
34</font></dt><dd>
35<dl>
36<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome_inspector.inspector_memory.html#InspectorMemory">InspectorMemory</a>
37</font></dt></dl>
38</dd>
39<dt><font face="helvetica, arial"><a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
40</font></dt><dd>
41<dl>
42<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome_inspector.inspector_memory.html#InspectorMemoryException">InspectorMemoryException</a>
43</font></dt></dl>
44</dd>
45</dl>
46 <p>
47<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
48<tr bgcolor="#ffc8d8">
49<td colspan=3 valign=bottom>&nbsp;<br>
50<font color="#000000" face="helvetica, arial"><a name="InspectorMemory">class <strong>InspectorMemory</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
51
52<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
53<td colspan=2><tt>Communicates&nbsp;with&nbsp;the&nbsp;remote&nbsp;inspector's&nbsp;Memory&nbsp;domain.<br>&nbsp;</tt></td></tr>
54<tr><td>&nbsp;</td>
55<td width="100%">Methods defined here:<br>
56<dl><dt><a name="InspectorMemory-GetDOMCounters"><strong>GetDOMCounters</strong></a>(self, timeout)</dt><dd><tt>Retrieves&nbsp;DOM&nbsp;element&nbsp;counts.<br>
57&nbsp;<br>
58Args:<br>
59&nbsp;&nbsp;timeout:&nbsp;The&nbsp;number&nbsp;of&nbsp;seconds&nbsp;to&nbsp;wait&nbsp;for&nbsp;the&nbsp;inspector&nbsp;backend&nbsp;to<br>
60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service&nbsp;the&nbsp;request&nbsp;before&nbsp;timing&nbsp;out.<br>
61&nbsp;<br>
62Returns:<br>
63&nbsp;&nbsp;A&nbsp;dictionary&nbsp;containing&nbsp;the&nbsp;counts&nbsp;associated&nbsp;with&nbsp;"nodes",&nbsp;"documents",<br>
64&nbsp;&nbsp;and&nbsp;"jsEventListeners".<br>
65Raises:<br>
66&nbsp;&nbsp;<a href="#InspectorMemoryException">InspectorMemoryException</a><br>
67&nbsp;&nbsp;websocket.WebSocketException<br>
68&nbsp;&nbsp;socket.error<br>
69&nbsp;&nbsp;exceptions.WebSocketDisconnected</tt></dd></dl>
70
71<dl><dt><a name="InspectorMemory-__init__"><strong>__init__</strong></a>(self, inspector_websocket)</dt></dl>
72
73<hr>
74Data descriptors defined here:<br>
75<dl><dt><strong>__dict__</strong></dt>
76<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
77</dl>
78<dl><dt><strong>__weakref__</strong></dt>
79<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
80</dl>
81</td></tr></table> <p>
82<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
83<tr bgcolor="#ffc8d8">
84<td colspan=3 valign=bottom>&nbsp;<br>
85<font color="#000000" face="helvetica, arial"><a name="InspectorMemoryException">class <strong>InspectorMemoryException</strong></a>(<a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>)</font></td></tr>
86
87<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
88<td width="100%"><dl><dt>Method resolution order:</dt>
89<dd><a href="telemetry.internal.backends.chrome_inspector.inspector_memory.html#InspectorMemoryException">InspectorMemoryException</a></dd>
90<dd><a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a></dd>
91<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
92<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
93<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
94</dl>
95<hr>
96Methods inherited from <a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>:<br>
97<dl><dt><a name="InspectorMemoryException-AddDebuggingMessage"><strong>AddDebuggingMessage</strong></a>(self, msg)</dt><dd><tt>Adds&nbsp;a&nbsp;message&nbsp;to&nbsp;the&nbsp;description&nbsp;of&nbsp;the&nbsp;exception.<br>
98&nbsp;<br>
99Many&nbsp;Telemetry&nbsp;exceptions&nbsp;arise&nbsp;from&nbsp;failures&nbsp;in&nbsp;another&nbsp;application.&nbsp;These<br>
100failures&nbsp;are&nbsp;difficult&nbsp;to&nbsp;pinpoint.&nbsp;This&nbsp;method&nbsp;allows&nbsp;Telemetry&nbsp;classes&nbsp;to<br>
101append&nbsp;useful&nbsp;debugging&nbsp;information&nbsp;to&nbsp;the&nbsp;exception.&nbsp;This&nbsp;method&nbsp;also&nbsp;logs<br>
102information&nbsp;about&nbsp;the&nbsp;location&nbsp;from&nbsp;where&nbsp;it&nbsp;was&nbsp;called.</tt></dd></dl>
103
104<dl><dt><a name="InspectorMemoryException-__init__"><strong>__init__</strong></a>(self, msg<font color="#909090">=''</font>)</dt></dl>
105
106<dl><dt><a name="InspectorMemoryException-__str__"><strong>__str__</strong></a>(self)</dt></dl>
107
108<hr>
109Data descriptors inherited from <a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>:<br>
110<dl><dt><strong>__weakref__</strong></dt>
111<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
112</dl>
113<hr>
114Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
115<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#InspectorMemoryException-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
116
117<hr>
118Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
119<dl><dt><a name="InspectorMemoryException-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#InspectorMemoryException-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
120
121<dl><dt><a name="InspectorMemoryException-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#InspectorMemoryException-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
122
123<dl><dt><a name="InspectorMemoryException-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#InspectorMemoryException-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
124
125<dl><dt><a name="InspectorMemoryException-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#InspectorMemoryException-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
126&nbsp;<br>
127Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
128
129<dl><dt><a name="InspectorMemoryException-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
130
131<dl><dt><a name="InspectorMemoryException-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#InspectorMemoryException-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
132
133<dl><dt><a name="InspectorMemoryException-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#InspectorMemoryException-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
134
135<dl><dt><a name="InspectorMemoryException-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
136
137<dl><dt><a name="InspectorMemoryException-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
138
139<hr>
140Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
141<dl><dt><strong>__dict__</strong></dt>
142</dl>
143<dl><dt><strong>args</strong></dt>
144</dl>
145<dl><dt><strong>message</strong></dt>
146</dl>
147</td></tr></table></td></tr></table>
148</body></html>