| Index: tools/telemetry/telemetry/web_perf/metrics/rendering_stats.py
|
| diff --git a/tools/telemetry/telemetry/web_perf/metrics/rendering_stats.py b/tools/telemetry/telemetry/web_perf/metrics/rendering_stats.py
|
| index 33c51fb0aba2ec229763470471d01dffc439c0d3..f5c4fe9dd7c540ac0530c5c8d3dc96d2da57f970 100644
|
| --- a/tools/telemetry/telemetry/web_perf/metrics/rendering_stats.py
|
| +++ b/tools/telemetry/telemetry/web_perf/metrics/rendering_stats.py
|
| @@ -1,10 +1,8 @@
|
| # 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.
|
| -import logging
|
| from operator import attrgetter
|
|
|
| -from telemetry.page import page_test
|
| from telemetry.web_perf.metrics import rendering_frame
|
|
|
| # These are LatencyInfo component names indicating the various components
|
| @@ -25,19 +23,6 @@ FORWARD_SCROLL_UPDATE_COMP_NAME = (
|
| END_COMP_NAME = 'INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT'
|
|
|
|
|
| -class NotEnoughFramesError(page_test.MeasurementFailure):
|
| - def __init__(self, frame_count):
|
| - super(NotEnoughFramesError, self).__init__(
|
| - 'Only %i frame timestamps were collected ' % frame_count +
|
| - '(at least two are required).\n'
|
| - 'Issues that have caused this in the past:\n' +
|
| - '- Browser bugs that prevents the page from redrawing\n' +
|
| - '- Bugs in the synthetic gesture code\n' +
|
| - '- Page and benchmark out of sync (e.g. clicked element was renamed)\n' +
|
| - '- Pages that render extremely slow\n' +
|
| - '- Pages that can\'t be scrolled')
|
| -
|
| -
|
| def GetInputLatencyEvents(process, timeline_range):
|
| """Get input events' LatencyInfo from the process's trace buffer that are
|
| within the timeline_range.
|
| @@ -133,7 +118,7 @@ class RenderingStats(object):
|
| if HasRenderingStats(browser_process):
|
| timestamp_process = browser_process
|
| else:
|
| - timestamp_process = renderer_process
|
| + timestamp_process = renderer_process
|
|
|
| self.frame_timestamps = []
|
| self.frame_times = []
|
| @@ -177,12 +162,6 @@ class RenderingStats(object):
|
| self._InitFrameQueueingDurationsFromTimeline(
|
| renderer_process, timeline_range)
|
|
|
| - # Check if we have collected at least 2 frames in every range. Otherwise we
|
| - # can't compute any meaningful metrics.
|
| - for segment in self.frame_timestamps:
|
| - if len(segment) < 2:
|
| - raise NotEnoughFramesError(len(segment))
|
| -
|
| def _InitInputLatencyStatsFromTimeline(
|
| self, browser_process, renderer_process, timeline_range):
|
| latency_events = GetInputLatencyEvents(browser_process, timeline_range)
|
| @@ -253,5 +232,5 @@ class RenderingStats(object):
|
| new_frame_queueing_durations = [e.queueing_duration for e in events]
|
| self.frame_queueing_durations.append(new_frame_queueing_durations)
|
| except rendering_frame.NoBeginFrameIdException:
|
| - logging.warning('Current chrome version does not support the queueing '
|
| - 'delay metric.')
|
| + # Queueing delay metric is unsupported in the browser used.
|
| + pass
|
|
|