Python: module telemetry.web_perf.metrics.smoothness

telemetry.web_perf.metrics.smoothness | index telemetry/web_perf/metrics/smoothness.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
`` |  |
telemetry.value.improvement_direction telemetry.value.list_of_scalar_values | logging telemetry.util.perf_tests_helper | telemetry.web_perf.metrics.rendering_stats telemetry.value.scalar | telemetry.util.statistics telemetry.web_perf.metrics.timeline_based_metric

Classes
`` |  | telemetry.web_perf.metrics.timeline_based_metric.TimelineBasedMetric(__builtin__.object) SmoothnessMetric
class SmoothnessMetric(telemetry.web_perf.metrics.timeline_based_metric.TimelineBasedMetric)
`` | `Computes metrics that measure smoothness of animations over given ranges. Animations are typically considered smooth if the frame rates are close to 60 frames per second (fps) and uniformly distributed over the sequence. To determine if a timeline range contains a smooth animation, we update the results object with several representative metrics: frame_times: A list of raw frame times mean_frame_time: The arithmetic mean of frame times percentage_smooth: Percentage of frames that were hitting 60 FPS. frame_time_discrepancy: The absolute discrepancy of frame timestamps mean_pixels_approximated: The mean percentage of pixels approximated queueing_durations: The queueing delay between compositor & main threads Note that if any of the interaction records provided to AddResults have less than 2 frames, we will return telemetry values with None values for each of the smoothness metrics. Similarly, older browsers without support for tracking the BeginMainFrame events will report a ListOfScalarValues with a None value for the queueing duration metric.`
| Method resolution order: SmoothnessMetric telemetry.web_perf.metrics.timeline_based_metric.TimelineBasedMetric __builtin__.object Methods defined here: AddResults(self, model, renderer_thread, interaction_records, results) __init__(self) Methods inherited from telemetry.web_perf.metrics.timeline_based_metric.TimelineBasedMetric: AddWholeTraceResults(self, model, results) `Computes and adds metrics corresponding to the entire trace. Override this method to compute results that correspond to the whole trace. Args: model: An instance of telemetry.timeline.model.TimelineModel. results: An instance of page.PageTestResults.` VerifyNonOverlappedRecords(self, interaction_records) `This raises exceptions if interaction_records contain overlapped ranges.` Data descriptors inherited from telemetry.web_perf.metrics.timeline_based_metric.TimelineBasedMetric: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Data
`` |  | NOT_ENOUGH_FRAMES_MESSAGE = "Not enough frames for smoothness metrics (at lea...der extremely slow\n- Pages that can't be scrolled"