telemetry.web_perf.metrics.rendering_stats | index telemetry/web_perf/metrics/rendering_stats.py

`# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Modules
`` |  |

itertools | telemetry.web_perf.metrics.rendering_frame |  |

Classes
`` |  |

__builtin__.object
  RenderingStats

class RenderingStats(__builtin__.object)
`` |  | Methods defined here:

__init__(self, renderer_process, browser_process, surface_flinger_process, timeline_ranges)
  `Utility class for extracting rendering statistics from the timeline (or
  other loggin facilities), and providing them in a common format to classes
  that compute benchmark metrics from this data.
  Stats are lists of lists of numbers. The outer list stores one list per
  timeline range.
  All *_time values are measured in milliseconds.`

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Functions
`` |  |

ComputeEventLatencies(input_events)
  `Compute input event latencies.
  Input event latency is the time from when the input event is created to
  when its resulted page is swap buffered.
  Input event on differnt platforms uses different LatencyInfo component to
  record its creation timestamp. We go through the following component list
  to find the creation timestamp:
  1. INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT -- when event is created in OS
  2. INPUT_EVENT_LATENCY_UI_COMPONENT -- when event reaches Chrome
  3. INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT -- when event reaches RenderWidget
  If the latency starts with a
  LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT component, then it is
  classified as a scroll update instead of a normal input latency measure.
  Returns:
  A list sorted by increasing start time of latencies which are tuples of
  (input_event_name, latency_in_ms).`

GetLatencyEvents(process, timeline_range)
  `Get LatencyInfo trace events from the process's trace buffer that are
  within the timeline_range.
  Input events dump their LatencyInfo into trace buffer as async trace event
  of name starting with "InputLatency". Non-input events with name starting
  with "Latency". The trace event has a memeber 'data' containing its latency
  history.`

GetTimestampEventName(process)
  `Returns the name of the events used to count frame timestamps.`

HasRenderingStats(process)
  `Returns True if the process contains at least one
  BenchmarkInstrumentation::*RenderingStats event with a frame.`

Data
`` |  | APPROXIMATED_PIXEL_ERROR = 'approximated_pixel_percentages' APPROXIMATED_VISIBLE_CONTENT_DATA = 'approximated_visible_content_area' BEGIN_COMP_NAME = 'INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT' BEGIN_SCROLL_UPDATE_COMP_NAME = 'LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT'
CHECKERBOARDED_PIXEL_ERROR = 'checkerboarded_pixel_percentages'
CHECKERBOARDED_VISIBLE_CONTENT_DATA = 'checkerboarded_visible_content_area'
END_COMP_NAME = 'INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT'
FORWARD_SCROLL_UPDATE_COMP_NAME = 'INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT'
GESTURE_SCROLL_UPDATE_EVENT_NAME = 'InputLatency::GestureScrollUpdate'
MAIN_THREAD_SCROLL_UPDATE_EVENT_NAME = 'Latency::ScrollUpdate'
ORIGINAL_COMP_NAME = 'INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT'
UI_COMP_NAME = 'INPUT_EVENT_LATENCY_UI_COMPONENT'
VISIBLE_CONTENT_DATA = 'visible_content_area'