Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Unified Diff: tools/telemetry/telemetry/web_perf/metrics/rendering_stats.py

Issue 476363002: NotEnoughFramesError no longer raises an exception. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address further comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/web_perf/metrics/rendering_stats_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6a1a8ca938cc6baeeb11b3a4ac40aba1a6aef4a1..492b4f6b7c72d3780d0db68f661bc45045db79fe 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
@@ -30,19 +28,6 @@ SCROLL_UPDATE_EVENT_NAME = 'InputLatency:ScrollUpdate'
GESTURE_SCROLL_UPDATE_EVENT_NAME = 'InputLatency:GestureScrollUpdate'
-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.
@@ -139,7 +124,11 @@ class RenderingStats(object):
if HasRenderingStats(browser_process):
timestamp_process = browser_process
else:
- timestamp_process = renderer_process
+ timestamp_process = renderer_process
+
+ # A lookup from list names below to any errors or exceptions encountered
+ # in attempting to generate that list.
+ self.errors = {}
chrishenry 2014/08/27 06:00:22 +1
self.frame_timestamps = []
self.frame_times = []
@@ -186,12 +175,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)
@@ -271,5 +254,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.')
+ self.errors['frame_queueing_durations'] = (
+ 'Current chrome version does not support the queueing delay metric.')
« no previous file with comments | « no previous file | tools/telemetry/telemetry/web_perf/metrics/rendering_stats_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698