1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3 <html><head><title>Python: module telemetry.core.timeline.model</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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.model</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/timeline/model.py">telemetry/core/timeline/model.py</a></font></td></tr></table> 12 <p><tt>A container for timeline-based events and traces and can handle importing<br> 13 raw event data from different sources. This model closely resembles that in the<br> 14 trace_viewer project:<br> 15 https://code.google.com/p/trace-viewer/</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.core.timeline.bounds.html">telemetry.core.timeline.bounds</a><br> 24 <a href="telemetry.core.browser.html">telemetry.core.browser</a><br> 25 </td><td width="25%" valign=top><a href="telemetry.core.timeline.empty_timeline_data_importer.html">telemetry.core.timeline.empty_timeline_data_importer</a><br> 26 <a href="telemetry.core.timeline.inspector_importer.html">telemetry.core.timeline.inspector_importer</a><br> 27 </td><td width="25%" valign=top><a href="telemetry.core.timeline.trace_event_importer.html">telemetry.core.timeline.trace_event_importer</a><br> 28 <a href="telemetry.core.timeline.process.html">telemetry.core.timeline.process</a><br> 29 </td><td width="25%" valign=top><a href="weakref.html">weakref</a><br> 30 <a href="telemetry.core.web_contents.html">telemetry.core.web_contents</a><br> 31 </td></tr></table></td></tr></table><p> 32 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 33 <tr bgcolor="#ee77aa"> 34 <td colspan=3 valign=bottom> <br> 35 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 36 37 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 38 <td width="100%"><dl> 39 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 40 </font></dt><dd> 41 <dl> 42 <dt><font face="helvetica, arial"><a href="telemetry.core.timeline.model.html#TimelineModel">TimelineModel</a> 43 </font></dt></dl> 44 </dd> 45 <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) 46 </font></dt><dd> 47 <dl> 48 <dt><font face="helvetica, arial"><a href="telemetry.core.timeline.model.html#MarkerMismatchError">MarkerMismatchError</a> 49 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.core.timeline.model.html#MarkerOverlapError">MarkerOverlapError</a> 50 </font></dt></dl> 51 </dd> 52 </dl> 53 <p> 54 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 55 <tr bgcolor="#ffc8d8"> 56 <td colspan=3 valign=bottom> <br> 57 <font color="#000000" face="helvetica, arial"><a name="MarkerMismatchError">class <strong>MarkerMismatchError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 58 59 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 60 <td width="100%"><dl><dt>Method resolution order:</dt> 61 <dd><a href="telemetry.core.timeline.model.html#MarkerMismatchError">MarkerMismatchError</a></dd> 62 <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 63 <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 64 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 65 </dl> 66 <hr> 67 Methods defined here:<br> 68 <dl><dt><a name="MarkerMismatchError-__init__"><strong>__init__</strong></a>(self)</dt></dl> 69 70 <hr> 71 Data descriptors defined here:<br> 72 <dl><dt><strong>__weakref__</strong></dt> 73 <dd><tt>list of weak references to the object (if defined)</tt></dd> 74 </dl> 75 <hr> 76 Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 77 <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#MarkerMismatchError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 78 79 <hr> 80 Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 81 <dl><dt><a name="MarkerMismatchError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerMismatchError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 82 83 <dl><dt><a name="MarkerMismatchError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerMismatchError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 84 85 <dl><dt><a name="MarkerMismatchError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerMismatchError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 86 87 <dl><dt><a name="MarkerMismatchError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerMismatchError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 88 <br> 89 Use of negative indices is not supported.</tt></dd></dl> 90 91 <dl><dt><a name="MarkerMismatchError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 92 93 <dl><dt><a name="MarkerMismatchError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerMismatchError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 94 95 <dl><dt><a name="MarkerMismatchError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerMismatchError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 96 97 <dl><dt><a name="MarkerMismatchError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 98 99 <dl><dt><a name="MarkerMismatchError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerMismatchError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 100 101 <dl><dt><a name="MarkerMismatchError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 102 103 <hr> 104 Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 105 <dl><dt><strong>__dict__</strong></dt> 106 </dl> 107 <dl><dt><strong>args</strong></dt> 108 </dl> 109 <dl><dt><strong>message</strong></dt> 110 </dl> 111 </td></tr></table> <p> 112 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 113 <tr bgcolor="#ffc8d8"> 114 <td colspan=3 valign=bottom> <br> 115 <font color="#000000" face="helvetica, arial"><a name="MarkerOverlapError">class <strong>MarkerOverlapError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 116 117 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 118 <td width="100%"><dl><dt>Method resolution order:</dt> 119 <dd><a href="telemetry.core.timeline.model.html#MarkerOverlapError">MarkerOverlapError</a></dd> 120 <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 121 <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 122 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 123 </dl> 124 <hr> 125 Methods defined here:<br> 126 <dl><dt><a name="MarkerOverlapError-__init__"><strong>__init__</strong></a>(self)</dt></dl> 127 128 <hr> 129 Data descriptors defined here:<br> 130 <dl><dt><strong>__weakref__</strong></dt> 131 <dd><tt>list of weak references to the object (if defined)</tt></dd> 132 </dl> 133 <hr> 134 Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 135 <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#MarkerOverlapError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 136 137 <hr> 138 Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 139 <dl><dt><a name="MarkerOverlapError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerOverlapError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 140 141 <dl><dt><a name="MarkerOverlapError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerOverlapError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 142 143 <dl><dt><a name="MarkerOverlapError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerOverlapError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 144 145 <dl><dt><a name="MarkerOverlapError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerOverlapError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 146 <br> 147 Use of negative indices is not supported.</tt></dd></dl> 148 149 <dl><dt><a name="MarkerOverlapError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 150 151 <dl><dt><a name="MarkerOverlapError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerOverlapError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 152 153 <dl><dt><a name="MarkerOverlapError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerOverlapError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 154 155 <dl><dt><a name="MarkerOverlapError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 156 157 <dl><dt><a name="MarkerOverlapError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MarkerOverlapError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 158 159 <dl><dt><a name="MarkerOverlapError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 160 161 <hr> 162 Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 163 <dl><dt><strong>__dict__</strong></dt> 164 </dl> 165 <dl><dt><strong>args</strong></dt> 166 </dl> 167 <dl><dt><strong>message</strong></dt> 168 </dl> 169 </td></tr></table> <p> 170 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 171 <tr bgcolor="#ffc8d8"> 172 <td colspan=3 valign=bottom> <br> 173 <font color="#000000" face="helvetica, arial"><a name="TimelineModel">class <strong>TimelineModel</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 174 175 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 176 <td width="100%">Methods defined here:<br> 177 <dl><dt><a name="TimelineModel-AddCoreObjectToContainerMapping"><strong>AddCoreObjectToContainerMapping</strong></a>(self, core_object, container)</dt><dd><tt>Add a mapping from a core <a href="__builtin__.html#object">object</a> to a timeline container.<br> 178 <br> 179 Used for example to map a Tab to its renderer process in the timeline model.</tt></dd></dl> 180 181 <dl><dt><a name="TimelineModel-FinalizeImport"><strong>FinalizeImport</strong></a>(self, shift_world_to_zero<font color="#909090">=False</font>, importers<font color="#909090">=None</font>)</dt></dl> 182 183 <dl><dt><a name="TimelineModel-FindTimelineMarkers"><strong>FindTimelineMarkers</strong></a>(self, timeline_marker_names)</dt><dd><tt>Find the timeline events with the given names.<br> 184 <br> 185 If the number and order of events found does not match the names,<br> 186 raise an error.</tt></dd></dl> 187 188 <dl><dt><a name="TimelineModel-GetAllContainers"><strong>GetAllContainers</strong></a>(self)</dt></dl> 189 190 <dl><dt><a name="TimelineModel-GetAllEvents"><strong>GetAllEvents</strong></a>(self)</dt></dl> 191 192 <dl><dt><a name="TimelineModel-GetAllEventsOfName"><strong>GetAllEventsOfName</strong></a>(self, name, only_root_events<font color="#909090">=False</font>)</dt></dl> 193 194 <dl><dt><a name="TimelineModel-GetAllProcesses"><strong>GetAllProcesses</strong></a>(self)</dt></dl> 195 196 <dl><dt><a name="TimelineModel-GetAllThreads"><strong>GetAllThreads</strong></a>(self)</dt></dl> 197 198 <dl><dt><a name="TimelineModel-GetEventOfName"><strong>GetEventOfName</strong></a>(self, name, only_root_events<font color="#909090">=False</font>, fail_if_more_than_one<font color="#909090">=False</font>)</dt></dl> 199 200 <dl><dt><a name="TimelineModel-GetOrCreateProcess"><strong>GetOrCreateProcess</strong></a>(self, pid)</dt></dl> 201 202 <dl><dt><a name="TimelineModel-GetRendererProcessFromTab"><strong>GetRendererProcessFromTab</strong></a>(self, tab)</dt></dl> 203 204 <dl><dt><a name="TimelineModel-GetRendererThreadFromTab"><strong>GetRendererThreadFromTab</strong></a>(self, tab)</dt></dl> 205 206 <dl><dt><a name="TimelineModel-ImportTraces"><strong>ImportTraces</strong></a>(self, timeline_data, shift_world_to_zero<font color="#909090">=True</font>)</dt></dl> 207 208 <dl><dt><a name="TimelineModel-IterAllEvents"><strong>IterAllEvents</strong></a>(self)</dt></dl> 209 210 <dl><dt><a name="TimelineModel-ShiftWorldToZero"><strong>ShiftWorldToZero</strong></a>(self)</dt></dl> 211 212 <dl><dt><a name="TimelineModel-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt></dl> 213 214 <dl><dt><a name="TimelineModel-__init__"><strong>__init__</strong></a>(self, timeline_data<font color="#909090">=None</font>, shift_world_to_zero<font color="#909090">=True</font>)</dt><dd><tt>Initializes a <a href="#TimelineModel">TimelineModel</a>. timeline_data can be a single TimelineData<br> 215 <a href="__builtin__.html#object">object</a>, a list of TimelineData objects, or None. If timeline_data is not<br> 216 None, all events from it will be imported into the model. The events will<br> 217 be shifted such that the first event starts at time 0, if<br> 218 shift_world_to_zero is True.</tt></dd></dl> 219 220 <hr> 221 Data descriptors defined here:<br> 222 <dl><dt><strong>__dict__</strong></dt> 223 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 224 </dl> 225 <dl><dt><strong>__weakref__</strong></dt> 226 <dd><tt>list of weak references to the object (if defined)</tt></dd> 227 </dl> 228 <dl><dt><strong>bounds</strong></dt> 229 </dl> 230 <dl><dt><strong>browser_process</strong></dt> 231 </dl> 232 <dl><dt><strong>processes</strong></dt> 233 </dl> 234 <dl><dt><strong>thread_time_bounds</strong></dt> 235 </dl> 236 </td></tr></table></td></tr></table> 237 </body></html>