1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.web_perf.metrics.rendering_stats</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.web_perf.html"><font color="#ffffff">web_perf</font></a>.<a href="telemetry.web_perf.metrics.html"><font color="#ffffff">metrics</font></a>.rendering_stats</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/web_perf/metrics/rendering_stats.py">telemetry/web_perf/metrics/rendering_stats.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="itertools.html">itertools</a><br>
24</td><td width="25%" valign=top><a href="telemetry.web_perf.metrics.rendering_frame.html">telemetry.web_perf.metrics.rendering_frame</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.web_perf.metrics.rendering_stats.html#RenderingStats">RenderingStats</a>
37</font></dt></dl>
38</dd>
39</dl>
40 <p>
41<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
42<tr bgcolor="#ffc8d8">
43<td colspan=3 valign=bottom>&nbsp;<br>
44<font color="#000000" face="helvetica, arial"><a name="RenderingStats">class <strong>RenderingStats</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
45
46<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
47<td width="100%">Methods defined here:<br>
48<dl><dt><a name="RenderingStats-__init__"><strong>__init__</strong></a>(self, renderer_process, browser_process, surface_flinger_process, timeline_ranges)</dt><dd><tt>Utility&nbsp;class&nbsp;for&nbsp;extracting&nbsp;rendering&nbsp;statistics&nbsp;from&nbsp;the&nbsp;timeline&nbsp;(or<br>
49other&nbsp;loggin&nbsp;facilities),&nbsp;and&nbsp;providing&nbsp;them&nbsp;in&nbsp;a&nbsp;common&nbsp;format&nbsp;to&nbsp;classes<br>
50that&nbsp;compute&nbsp;benchmark&nbsp;metrics&nbsp;from&nbsp;this&nbsp;data.<br>
51&nbsp;<br>
52Stats&nbsp;are&nbsp;lists&nbsp;of&nbsp;lists&nbsp;of&nbsp;numbers.&nbsp;The&nbsp;outer&nbsp;list&nbsp;stores&nbsp;one&nbsp;list&nbsp;per<br>
53timeline&nbsp;range.<br>
54&nbsp;<br>
55All&nbsp;*_time&nbsp;values&nbsp;are&nbsp;measured&nbsp;in&nbsp;milliseconds.</tt></dd></dl>
56
57<hr>
58Data descriptors defined here:<br>
59<dl><dt><strong>__dict__</strong></dt>
60<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
61</dl>
62<dl><dt><strong>__weakref__</strong></dt>
63<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
64</dl>
65</td></tr></table></td></tr></table><p>
66<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
67<tr bgcolor="#eeaa77">
68<td colspan=3 valign=bottom>&nbsp;<br>
69<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
70
71<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
72<td width="100%"><dl><dt><a name="-ComputeEventLatencies"><strong>ComputeEventLatencies</strong></a>(input_events)</dt><dd><tt>Compute&nbsp;input&nbsp;event&nbsp;latencies.<br>
73&nbsp;<br>
74Input&nbsp;event&nbsp;latency&nbsp;is&nbsp;the&nbsp;time&nbsp;from&nbsp;when&nbsp;the&nbsp;input&nbsp;event&nbsp;is&nbsp;created&nbsp;to<br>
75when&nbsp;its&nbsp;resulted&nbsp;page&nbsp;is&nbsp;swap&nbsp;buffered.<br>
76Input&nbsp;event&nbsp;on&nbsp;differnt&nbsp;platforms&nbsp;uses&nbsp;different&nbsp;LatencyInfo&nbsp;component&nbsp;to<br>
77record&nbsp;its&nbsp;creation&nbsp;timestamp.&nbsp;We&nbsp;go&nbsp;through&nbsp;the&nbsp;following&nbsp;component&nbsp;list<br>
78to&nbsp;find&nbsp;the&nbsp;creation&nbsp;timestamp:<br>
791.&nbsp;INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT&nbsp;--&nbsp;when&nbsp;event&nbsp;is&nbsp;created&nbsp;in&nbsp;OS<br>
802.&nbsp;INPUT_EVENT_LATENCY_UI_COMPONENT&nbsp;--&nbsp;when&nbsp;event&nbsp;reaches&nbsp;Chrome<br>
813.&nbsp;INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT&nbsp;--&nbsp;when&nbsp;event&nbsp;reaches&nbsp;RenderWidget<br>
82&nbsp;<br>
83If&nbsp;the&nbsp;latency&nbsp;starts&nbsp;with&nbsp;a<br>
84LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT&nbsp;component,&nbsp;then&nbsp;it&nbsp;is<br>
85classified&nbsp;as&nbsp;a&nbsp;scroll&nbsp;update&nbsp;instead&nbsp;of&nbsp;a&nbsp;normal&nbsp;input&nbsp;latency&nbsp;measure.<br>
86&nbsp;<br>
87Returns:<br>
88&nbsp;&nbsp;A&nbsp;list&nbsp;sorted&nbsp;by&nbsp;increasing&nbsp;start&nbsp;time&nbsp;of&nbsp;latencies&nbsp;which&nbsp;are&nbsp;tuples&nbsp;of<br>
89&nbsp;&nbsp;(input_event_name,&nbsp;latency_in_ms).</tt></dd></dl>
90 <dl><dt><a name="-GetLatencyEvents"><strong>GetLatencyEvents</strong></a>(process, timeline_range)</dt><dd><tt>Get&nbsp;LatencyInfo&nbsp;trace&nbsp;events&nbsp;from&nbsp;the&nbsp;process's&nbsp;trace&nbsp;buffer&nbsp;that&nbsp;are<br>
91&nbsp;&nbsp;&nbsp;within&nbsp;the&nbsp;timeline_range.<br>
92&nbsp;<br>
93Input&nbsp;events&nbsp;dump&nbsp;their&nbsp;LatencyInfo&nbsp;into&nbsp;trace&nbsp;buffer&nbsp;as&nbsp;async&nbsp;trace&nbsp;event<br>
94of&nbsp;name&nbsp;starting&nbsp;with&nbsp;"InputLatency".&nbsp;Non-input&nbsp;events&nbsp;with&nbsp;name&nbsp;starting<br>
95with&nbsp;"Latency".&nbsp;The&nbsp;trace&nbsp;event&nbsp;has&nbsp;a&nbsp;memeber&nbsp;'data'&nbsp;containing&nbsp;its&nbsp;latency<br>
96history.</tt></dd></dl>
97 <dl><dt><a name="-GetTimestampEventName"><strong>GetTimestampEventName</strong></a>(process)</dt><dd><tt>Returns&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;events&nbsp;used&nbsp;to&nbsp;count&nbsp;frame&nbsp;timestamps.</tt></dd></dl>
98 <dl><dt><a name="-HasRenderingStats"><strong>HasRenderingStats</strong></a>(process)</dt><dd><tt>Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;process&nbsp;contains&nbsp;at&nbsp;least&nbsp;one<br>
99BenchmarkInstrumentation::*<a href="#RenderingStats">RenderingStats</a>&nbsp;event&nbsp;with&nbsp;a&nbsp;frame.</tt></dd></dl>
100</td></tr></table><p>
101<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
102<tr bgcolor="#55aa55">
103<td colspan=3 valign=bottom>&nbsp;<br>
104<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
105
106<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
107<td width="100%"><strong>APPROXIMATED_PIXEL_ERROR</strong> = 'approximated_pixel_percentages'<br>
108<strong>APPROXIMATED_VISIBLE_CONTENT_DATA</strong> = 'approximated_visible_content_area'<br>
109<strong>BEGIN_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT'<br>
110<strong>BEGIN_SCROLL_UPDATE_COMP_NAME</strong> = 'LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT'<br>
111<strong>CHECKERBOARDED_PIXEL_ERROR</strong> = 'checkerboarded_pixel_percentages'<br>
112<strong>CHECKERBOARDED_VISIBLE_CONTENT_DATA</strong> = 'checkerboarded_visible_content_area'<br>
113<strong>END_COMP_NAME</strong> = 'INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT'<br>
114<strong>FORWARD_SCROLL_UPDATE_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT'<br>
115<strong>GESTURE_SCROLL_UPDATE_EVENT_NAME</strong> = 'InputLatency::GestureScrollUpdate'<br>
116<strong>MAIN_THREAD_SCROLL_UPDATE_EVENT_NAME</strong> = 'Latency::ScrollUpdate'<br>
117<strong>ORIGINAL_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT'<br>
118<strong>UI_COMP_NAME</strong> = 'INPUT_EVENT_LATENCY_UI_COMPONENT'<br>
119<strong>VISIBLE_CONTENT_DATA</strong> = 'visible_content_area'</td></tr></table>
120</body></html>