1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.timeline.counter</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.timeline.html"><font color="#ffffff">timeline</font></a>.counter</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/timeline/counter.py">telemetry/timeline/counter.py</a></font></td></tr></table>
13    <p><tt>#&nbsp;Copyright&nbsp;2014&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.timeline.event_container.html">telemetry.timeline.event_container</a><br>
24</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
25<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
26<tr bgcolor="#ee77aa">
27<td colspan=3 valign=bottom>&nbsp;<br>
28<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
29
30<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
31<td width="100%"><dl>
32<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
33</font></dt><dd>
34<dl>
35<dt><font face="helvetica, arial"><a href="telemetry.timeline.counter.html#CounterSample">CounterSample</a>
36</font></dt></dl>
37</dd>
38<dt><font face="helvetica, arial"><a href="telemetry.timeline.event_container.html#TimelineEventContainer">telemetry.timeline.event_container.TimelineEventContainer</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
39</font></dt><dd>
40<dl>
41<dt><font face="helvetica, arial"><a href="telemetry.timeline.counter.html#Counter">Counter</a>
42</font></dt></dl>
43</dd>
44</dl>
45 <p>
46<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
47<tr bgcolor="#ffc8d8">
48<td colspan=3 valign=bottom>&nbsp;<br>
49<font color="#000000" face="helvetica, arial"><a name="Counter">class <strong>Counter</strong></a>(<a href="telemetry.timeline.event_container.html#TimelineEventContainer">telemetry.timeline.event_container.TimelineEventContainer</a>)</font></td></tr>
50
51<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
52<td colspan=2><tt>Stores&nbsp;all&nbsp;the&nbsp;samples&nbsp;for&nbsp;a&nbsp;given&nbsp;counter.<br>&nbsp;</tt></td></tr>
53<tr><td>&nbsp;</td>
54<td width="100%"><dl><dt>Method resolution order:</dt>
55<dd><a href="telemetry.timeline.counter.html#Counter">Counter</a></dd>
56<dd><a href="telemetry.timeline.event_container.html#TimelineEventContainer">telemetry.timeline.event_container.TimelineEventContainer</a></dd>
57<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
58</dl>
59<hr>
60Methods defined here:<br>
61<dl><dt><a name="Counter-FinalizeImport"><strong>FinalizeImport</strong></a>(self)</dt></dl>
62
63<dl><dt><a name="Counter-IterChildContainers"><strong>IterChildContainers</strong></a>(self)</dt></dl>
64
65<dl><dt><a name="Counter-IterEventsInThisContainer"><strong>IterEventsInThisContainer</strong></a>(self, event_type_predicate, event_predicate)</dt></dl>
66
67<dl><dt><a name="Counter-__init__"><strong>__init__</strong></a>(self, parent, category, name)</dt></dl>
68
69<hr>
70Data descriptors defined here:<br>
71<dl><dt><strong>num_samples</strong></dt>
72</dl>
73<dl><dt><strong>num_series</strong></dt>
74</dl>
75<hr>
76Methods inherited from <a href="telemetry.timeline.event_container.html#TimelineEventContainer">telemetry.timeline.event_container.TimelineEventContainer</a>:<br>
77<dl><dt><a name="Counter-GetAllEvents"><strong>GetAllEvents</strong></a>(self, recursive<font color="#909090">=True</font>)</dt><dd><tt>#&nbsp;List&nbsp;versions.&nbsp;These&nbsp;should&nbsp;always&nbsp;be&nbsp;simple&nbsp;expressions&nbsp;that&nbsp;list()&nbsp;on<br>
78#&nbsp;an&nbsp;underlying&nbsp;iter&nbsp;method.</tt></dd></dl>
79
80<dl><dt><a name="Counter-GetAllEventsOfName"><strong>GetAllEventsOfName</strong></a>(self, name, recursive<font color="#909090">=True</font>)</dt></dl>
81
82<dl><dt><a name="Counter-GetAllToplevelSlicesOfName"><strong>GetAllToplevelSlicesOfName</strong></a>(self, name, recursive<font color="#909090">=True</font>)</dt></dl>
83
84<dl><dt><a name="Counter-IterAllAsyncSlicesOfName"><strong>IterAllAsyncSlicesOfName</strong></a>(self, name, recursive<font color="#909090">=True</font>)</dt></dl>
85
86<dl><dt><a name="Counter-IterAllAsyncSlicesStartsWithName"><strong>IterAllAsyncSlicesStartsWithName</strong></a>(self, name, recursive<font color="#909090">=True</font>)</dt></dl>
87
88<dl><dt><a name="Counter-IterAllEvents"><strong>IterAllEvents</strong></a>(self, recursive<font color="#909090">=True</font>, event_type_predicate<font color="#909090">=&lt;function &lt;lambda&gt;&gt;</font>, event_predicate<font color="#909090">=&lt;function &lt;lambda&gt;&gt;</font>)</dt><dd><tt>Iterates&nbsp;all&nbsp;events&nbsp;in&nbsp;this&nbsp;container,&nbsp;pre-filtered&nbsp;by&nbsp;two&nbsp;predicates.<br>
89&nbsp;<br>
90Only&nbsp;events&nbsp;with&nbsp;a&nbsp;type&nbsp;matching&nbsp;event_type_predicate&nbsp;AND&nbsp;matching&nbsp;event<br>
91event_predicate&nbsp;will&nbsp;be&nbsp;yielded.<br>
92&nbsp;<br>
93event_type_predicate&nbsp;is&nbsp;given&nbsp;an&nbsp;actual&nbsp;type&nbsp;<a href="__builtin__.html#object">object</a>,&nbsp;e.g.:<br>
94&nbsp;&nbsp;&nbsp;&nbsp;event_type_predicate(slice_module.Slice)<br>
95&nbsp;<br>
96event_predicate&nbsp;is&nbsp;given&nbsp;actual&nbsp;events:<br>
97&nbsp;&nbsp;&nbsp;&nbsp;event_predicate(thread.slices[7])</tt></dd></dl>
98
99<dl><dt><a name="Counter-IterAllEventsOfName"><strong>IterAllEventsOfName</strong></a>(self, name, recursive<font color="#909090">=True</font>)</dt><dd><tt>#&nbsp;Helper&nbsp;functions&nbsp;for&nbsp;finding&nbsp;common&nbsp;kinds&nbsp;of&nbsp;events.&nbsp;Must&nbsp;always&nbsp;take&nbsp;an<br>
100#&nbsp;optinal&nbsp;recurisve&nbsp;parameter&nbsp;and&nbsp;be&nbsp;implemented&nbsp;in&nbsp;terms&nbsp;fo&nbsp;IterAllEvents.</tt></dd></dl>
101
102<dl><dt><a name="Counter-IterAllFlowEvents"><strong>IterAllFlowEvents</strong></a>(self, recursive<font color="#909090">=True</font>)</dt></dl>
103
104<dl><dt><a name="Counter-IterAllSlices"><strong>IterAllSlices</strong></a>(self, recursive<font color="#909090">=True</font>)</dt></dl>
105
106<dl><dt><a name="Counter-IterAllSlicesInRange"><strong>IterAllSlicesInRange</strong></a>(self, start, end, recursive<font color="#909090">=True</font>)</dt></dl>
107
108<dl><dt><a name="Counter-IterAllSlicesOfName"><strong>IterAllSlicesOfName</strong></a>(self, name, recursive<font color="#909090">=True</font>)</dt></dl>
109
110<dl><dt><a name="Counter-IterAllToplevelSlicesOfName"><strong>IterAllToplevelSlicesOfName</strong></a>(self, name, recursive<font color="#909090">=True</font>)</dt></dl>
111
112<hr>
113Static methods inherited from <a href="telemetry.timeline.event_container.html#TimelineEventContainer">telemetry.timeline.event_container.TimelineEventContainer</a>:<br>
114<dl><dt><a name="Counter-IsAsyncSlice"><strong>IsAsyncSlice</strong></a>(t)</dt></dl>
115
116<hr>
117Data descriptors inherited from <a href="telemetry.timeline.event_container.html#TimelineEventContainer">telemetry.timeline.event_container.TimelineEventContainer</a>:<br>
118<dl><dt><strong>__dict__</strong></dt>
119<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
120</dl>
121<dl><dt><strong>__weakref__</strong></dt>
122<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
123</dl>
124</td></tr></table> <p>
125<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
126<tr bgcolor="#ffc8d8">
127<td colspan=3 valign=bottom>&nbsp;<br>
128<font color="#000000" face="helvetica, arial"><a name="CounterSample">class <strong>CounterSample</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
129
130<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
131<td colspan=2><tt>#&nbsp;Doesn't&nbsp;inherit&nbsp;from&nbsp;TimelineEvent&nbsp;because&nbsp;its&nbsp;only&nbsp;a&nbsp;temporary&nbsp;wrapper&nbsp;of&nbsp;a<br>
132#&nbsp;counter&nbsp;sample&nbsp;into&nbsp;an&nbsp;event.&nbsp;During&nbsp;stable&nbsp;operation,&nbsp;the&nbsp;samples&nbsp;are&nbsp;stored<br>
133#&nbsp;a&nbsp;dense&nbsp;array&nbsp;of&nbsp;values&nbsp;rather&nbsp;than&nbsp;in&nbsp;the&nbsp;long-form&nbsp;done&nbsp;by&nbsp;an&nbsp;Event.<br>&nbsp;</tt></td></tr>
134<tr><td>&nbsp;</td>
135<td width="100%">Methods defined here:<br>
136<dl><dt><a name="CounterSample-__init__"><strong>__init__</strong></a>(self, counter, sample_index)</dt></dl>
137
138<hr>
139Data descriptors defined here:<br>
140<dl><dt><strong>__dict__</strong></dt>
141<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
142</dl>
143<dl><dt><strong>__weakref__</strong></dt>
144<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
145</dl>
146<dl><dt><strong>category</strong></dt>
147</dl>
148<dl><dt><strong>duration</strong></dt>
149</dl>
150<dl><dt><strong>end</strong></dt>
151</dl>
152<dl><dt><strong>name</strong></dt>
153</dl>
154<dl><dt><strong>start</strong></dt>
155</dl>
156<dl><dt><strong>thread_duration</strong></dt>
157</dl>
158<dl><dt><strong>thread_end</strong></dt>
159</dl>
160<dl><dt><strong>thread_start</strong></dt>
161</dl>
162<dl><dt><strong>value</strong></dt>
163</dl>
164</td></tr></table></td></tr></table>
165</body></html>