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> <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.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># Copyright 2014 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="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> <br> 29 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 30 31 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </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> <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> </tt></td><td> </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 class for extracting rendering statistics from the timeline (or<br> 49 other loggin facilities), and providing them in a common format to classes<br> 50 that compute benchmark metrics from this data.<br> 51 <br> 52 Stats are lists of lists of numbers. The outer list stores one list per<br> 53 timeline range.<br> 54 <br> 55 All *_time values are measured in milliseconds.</tt></dd></dl> 56 57 <hr> 58 Data descriptors defined here:<br> 59 <dl><dt><strong>__dict__</strong></dt> 60 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 61 </dl> 62 <dl><dt><strong>__weakref__</strong></dt> 63 <dd><tt>list of weak references to the object (if 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> <br> 69 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> 70 71 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> 72 <td width="100%"><dl><dt><a name="-ComputeEventLatencies"><strong>ComputeEventLatencies</strong></a>(input_events)</dt><dd><tt>Compute input event latencies.<br> 73 <br> 74 Input event latency is the time from when the input event is created to<br> 75 when its resulted page is swap buffered.<br> 76 Input event on differnt platforms uses different LatencyInfo component to<br> 77 record its creation timestamp. We go through the following component list<br> 78 to find the creation timestamp:<br> 79 1. INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT -- when event is created in OS<br> 80 2. INPUT_EVENT_LATENCY_UI_COMPONENT -- when event reaches Chrome<br> 81 3. INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT -- when event reaches RenderWidget<br> 82 <br> 83 If the latency starts with a<br> 84 LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT component, then it is<br> 85 classified as a scroll update instead of a normal input latency measure.<br> 86 <br> 87 Returns:<br> 88 A list sorted by increasing start time of latencies which are tuples of<br> 89 (input_event_name, latency_in_ms).</tt></dd></dl> 90 <dl><dt><a name="-GetLatencyEvents"><strong>GetLatencyEvents</strong></a>(process, timeline_range)</dt><dd><tt>Get LatencyInfo trace events from the process's trace buffer that are<br> 91 within the timeline_range.<br> 92 <br> 93 Input events dump their LatencyInfo into trace buffer as async trace event<br> 94 of name starting with "InputLatency". Non-input events with name starting<br> 95 with "Latency". The trace event has a memeber 'data' containing its latency<br> 96 history.</tt></dd></dl> 97 <dl><dt><a name="-GetTimestampEventName"><strong>GetTimestampEventName</strong></a>(process)</dt><dd><tt>Returns the name of the events used to count frame timestamps.</tt></dd></dl> 98 <dl><dt><a name="-HasRenderingStats"><strong>HasRenderingStats</strong></a>(process)</dt><dd><tt>Returns True if the process contains at least one<br> 99 BenchmarkInstrumentation::*<a href="#RenderingStats">RenderingStats</a> event with a 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> <br> 104 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> 105 106 <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </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>