1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: module telemetry.internal.backends.chrome_inspector.memory_backend</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> <br> 10<font color="#ffffff" face="helvetica, arial"> <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>.memory_backend</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/memory_backend.py">telemetry/internal/backends/chrome_inspector/memory_backend.py</a></font></td></tr></table> 13 <p><tt># Copyright 2015 The Chromium Authors. All rights reserved.<br> 14# Use of this source code is governed by a BSD-style license that can be<br> 15# found in the LICENSE 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> <br> 20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 21 22<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.internal.backends.chrome_inspector.inspector_websocket.html">telemetry.internal.backends.chrome_inspector.inspector_websocket</a><br> 24<a href="json.html">json</a><br> 25</td><td width="25%" valign=top><a href="logging.html">logging</a><br> 26<a href="socket.html">socket</a><br> 27</td><td width="25%" valign=top><a href="traceback.html">traceback</a><br> 28<a href="telemetry.internal.backends.chrome_inspector.websocket.html">telemetry.internal.backends.chrome_inspector.websocket</a><br> 29</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> 30<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 31<tr bgcolor="#ee77aa"> 32<td colspan=3 valign=bottom> <br> 33<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 34 35<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 36<td width="100%"><dl> 37<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 38</font></dt><dd> 39<dl> 40<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome_inspector.memory_backend.html#MemoryBackend">MemoryBackend</a> 41</font></dt></dl> 42</dd> 43<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) 44</font></dt><dd> 45<dl> 46<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome_inspector.memory_backend.html#MemoryTimeoutException">MemoryTimeoutException</a> 47</font></dt><dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome_inspector.memory_backend.html#MemoryUnexpectedResponseException">MemoryUnexpectedResponseException</a> 48</font></dt><dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome_inspector.memory_backend.html#MemoryUnrecoverableException">MemoryUnrecoverableException</a> 49</font></dt></dl> 50</dd> 51</dl> 52 <p> 53<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 54<tr bgcolor="#ffc8d8"> 55<td colspan=3 valign=bottom> <br> 56<font color="#000000" face="helvetica, arial"><a name="MemoryBackend">class <strong>MemoryBackend</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 57 58<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 59<td width="100%">Methods defined here:<br> 60<dl><dt><a name="MemoryBackend-Close"><strong>Close</strong></a>(self)</dt></dl> 61 62<dl><dt><a name="MemoryBackend-SetMemoryPressureNotificationsSuppressed"><strong>SetMemoryPressureNotificationsSuppressed</strong></a>(self, suppressed, timeout<font color="#909090">=30</font>)</dt><dd><tt>Enable/disable suppressing memory pressure notifications.<br> 63 <br> 64Args:<br> 65 suppressed: If true, memory pressure notifications will be suppressed.<br> 66 timeout: The timeout in seconds.<br> 67 <br> 68Raises:<br> 69 <a href="#MemoryTimeoutException">MemoryTimeoutException</a>: If more than |timeout| seconds has passed<br> 70 since the last time any data is received.<br> 71 <a href="#MemoryUnrecoverableException">MemoryUnrecoverableException</a>: If there is a websocket error.<br> 72 <a href="#MemoryUnexpectedResponseException">MemoryUnexpectedResponseException</a>: If the response contains an error<br> 73 or does not contain the expected result.</tt></dd></dl> 74 75<dl><dt><a name="MemoryBackend-SimulateMemoryPressureNotification"><strong>SimulateMemoryPressureNotification</strong></a>(self, pressure_level, timeout<font color="#909090">=30</font>)</dt><dd><tt>Simulate a memory pressure notification.<br> 76 <br> 77Args:<br> 78 pressure level: The memory pressure level of the notification ('moderate'<br> 79 or 'critical').<br> 80 timeout: The timeout in seconds.<br> 81 <br> 82Raises:<br> 83 <a href="#MemoryTimeoutException">MemoryTimeoutException</a>: If more than |timeout| seconds has passed<br> 84 since the last time any data is received.<br> 85 <a href="#MemoryUnrecoverableException">MemoryUnrecoverableException</a>: If there is a websocket error.<br> 86 <a href="#MemoryUnexpectedResponseException">MemoryUnexpectedResponseException</a>: If the response contains an error<br> 87 or does not contain the expected result.</tt></dd></dl> 88 89<dl><dt><a name="MemoryBackend-__init__"><strong>__init__</strong></a>(self, inspector_socket)</dt></dl> 90 91<hr> 92Data descriptors defined here:<br> 93<dl><dt><strong>__dict__</strong></dt> 94<dd><tt>dictionary for instance variables (if defined)</tt></dd> 95</dl> 96<dl><dt><strong>__weakref__</strong></dt> 97<dd><tt>list of weak references to the object (if defined)</tt></dd> 98</dl> 99</td></tr></table> <p> 100<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 101<tr bgcolor="#ffc8d8"> 102<td colspan=3 valign=bottom> <br> 103<font color="#000000" face="helvetica, arial"><a name="MemoryTimeoutException">class <strong>MemoryTimeoutException</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 104 105<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 106<td width="100%"><dl><dt>Method resolution order:</dt> 107<dd><a href="telemetry.internal.backends.chrome_inspector.memory_backend.html#MemoryTimeoutException">MemoryTimeoutException</a></dd> 108<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 109<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 110<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 111</dl> 112<hr> 113Data descriptors defined here:<br> 114<dl><dt><strong>__weakref__</strong></dt> 115<dd><tt>list of weak references to the object (if defined)</tt></dd> 116</dl> 117<hr> 118Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 119<dl><dt><a name="MemoryTimeoutException-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 120 121<hr> 122Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 123<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#MemoryTimeoutException-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 124 125<hr> 126Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 127<dl><dt><a name="MemoryTimeoutException-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 128 129<dl><dt><a name="MemoryTimeoutException-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 130 131<dl><dt><a name="MemoryTimeoutException-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 132 133<dl><dt><a name="MemoryTimeoutException-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 134 <br> 135Use of negative indices is not supported.</tt></dd></dl> 136 137<dl><dt><a name="MemoryTimeoutException-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 138 139<dl><dt><a name="MemoryTimeoutException-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 140 141<dl><dt><a name="MemoryTimeoutException-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 142 143<dl><dt><a name="MemoryTimeoutException-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 144 145<dl><dt><a name="MemoryTimeoutException-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryTimeoutException-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 146 147<dl><dt><a name="MemoryTimeoutException-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 148 149<hr> 150Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 151<dl><dt><strong>__dict__</strong></dt> 152</dl> 153<dl><dt><strong>args</strong></dt> 154</dl> 155<dl><dt><strong>message</strong></dt> 156</dl> 157</td></tr></table> <p> 158<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 159<tr bgcolor="#ffc8d8"> 160<td colspan=3 valign=bottom> <br> 161<font color="#000000" face="helvetica, arial"><a name="MemoryUnexpectedResponseException">class <strong>MemoryUnexpectedResponseException</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 162 163<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 164<td width="100%"><dl><dt>Method resolution order:</dt> 165<dd><a href="telemetry.internal.backends.chrome_inspector.memory_backend.html#MemoryUnexpectedResponseException">MemoryUnexpectedResponseException</a></dd> 166<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 167<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 168<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 169</dl> 170<hr> 171Data descriptors defined here:<br> 172<dl><dt><strong>__weakref__</strong></dt> 173<dd><tt>list of weak references to the object (if defined)</tt></dd> 174</dl> 175<hr> 176Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 177<dl><dt><a name="MemoryUnexpectedResponseException-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 178 179<hr> 180Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 181<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#MemoryUnexpectedResponseException-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 182 183<hr> 184Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 185<dl><dt><a name="MemoryUnexpectedResponseException-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 186 187<dl><dt><a name="MemoryUnexpectedResponseException-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 188 189<dl><dt><a name="MemoryUnexpectedResponseException-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 190 191<dl><dt><a name="MemoryUnexpectedResponseException-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 192 <br> 193Use of negative indices is not supported.</tt></dd></dl> 194 195<dl><dt><a name="MemoryUnexpectedResponseException-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 196 197<dl><dt><a name="MemoryUnexpectedResponseException-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 198 199<dl><dt><a name="MemoryUnexpectedResponseException-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 200 201<dl><dt><a name="MemoryUnexpectedResponseException-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 202 203<dl><dt><a name="MemoryUnexpectedResponseException-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnexpectedResponseException-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 204 205<dl><dt><a name="MemoryUnexpectedResponseException-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 206 207<hr> 208Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 209<dl><dt><strong>__dict__</strong></dt> 210</dl> 211<dl><dt><strong>args</strong></dt> 212</dl> 213<dl><dt><strong>message</strong></dt> 214</dl> 215</td></tr></table> <p> 216<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 217<tr bgcolor="#ffc8d8"> 218<td colspan=3 valign=bottom> <br> 219<font color="#000000" face="helvetica, arial"><a name="MemoryUnrecoverableException">class <strong>MemoryUnrecoverableException</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 220 221<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 222<td width="100%"><dl><dt>Method resolution order:</dt> 223<dd><a href="telemetry.internal.backends.chrome_inspector.memory_backend.html#MemoryUnrecoverableException">MemoryUnrecoverableException</a></dd> 224<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 225<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 226<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 227</dl> 228<hr> 229Data descriptors defined here:<br> 230<dl><dt><strong>__weakref__</strong></dt> 231<dd><tt>list of weak references to the object (if defined)</tt></dd> 232</dl> 233<hr> 234Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 235<dl><dt><a name="MemoryUnrecoverableException-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 236 237<hr> 238Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 239<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#MemoryUnrecoverableException-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 240 241<hr> 242Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 243<dl><dt><a name="MemoryUnrecoverableException-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 244 245<dl><dt><a name="MemoryUnrecoverableException-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 246 247<dl><dt><a name="MemoryUnrecoverableException-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 248 249<dl><dt><a name="MemoryUnrecoverableException-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 250 <br> 251Use of negative indices is not supported.</tt></dd></dl> 252 253<dl><dt><a name="MemoryUnrecoverableException-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 254 255<dl><dt><a name="MemoryUnrecoverableException-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 256 257<dl><dt><a name="MemoryUnrecoverableException-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 258 259<dl><dt><a name="MemoryUnrecoverableException-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 260 261<dl><dt><a name="MemoryUnrecoverableException-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MemoryUnrecoverableException-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 262 263<dl><dt><a name="MemoryUnrecoverableException-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 264 265<hr> 266Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 267<dl><dt><strong>__dict__</strong></dt> 268</dl> 269<dl><dt><strong>args</strong></dt> 270</dl> 271<dl><dt><strong>message</strong></dt> 272</dl> 273</td></tr></table></td></tr></table> 274</body></html>