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

Unified Diff: tools/perf/measurements/smoothness_controller.py

Issue 260903019: Dump raw tracing data when smoothness_controlller fails to issue timeline marker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change fails -> failed in debugging message Created 6 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/smoothness_controller.py
diff --git a/tools/perf/measurements/smoothness_controller.py b/tools/perf/measurements/smoothness_controller.py
index c80834fcbfe7ef2c3da6b086fa231600ff41574f..3479331ef0d158a3321bc0022fe18877ebac28b5 100644
--- a/tools/perf/measurements/smoothness_controller.py
+++ b/tools/perf/measurements/smoothness_controller.py
@@ -1,6 +1,7 @@
# 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 sys
from measurements import smooth_gesture_util
from metrics import smoothness
@@ -21,6 +22,7 @@ class MissingDisplayFrameRateError(page_measurement.MeasurementFailure):
class SmoothnessController(object):
def __init__(self):
self._timeline_model = None
+ self._tracing_timeline_data = None
def Start(self, page, tab):
custom_categories = ['webkit.console', 'benchmark']
@@ -39,8 +41,9 @@ class SmoothnessController(object):
# Stop tracing for smoothness metric.
if tab.browser.platform.IsRawDisplayFrameRateSupported():
tab.browser.platform.StopRawDisplayFrameRateMeasurement()
- tracing_timeline_data = tab.browser.StopTracing()
- self._timeline_model = TimelineModel(timeline_data=tracing_timeline_data)
+ self._tracing_timeline_data = tab.browser.StopTracing()
+ self._timeline_model = TimelineModel(
+ timeline_data=self._tracing_timeline_data)
def AddResults(self, tab, results):
# Add results of smoothness metric. This computes the smoothness metric for
@@ -69,10 +72,14 @@ class SmoothnessController(object):
# TODO(nednguyen): when crbug.com/239179 is marked fixed, makes sure that
# page sets are responsible for issueing the markers themselves.
if len(smooth_records) == 0:
- assert run_smooth_actions_record, (
- 'SmoothnessController fails to issue markers for the whole '
- 'interaction.')
- smooth_records = [run_smooth_actions_record]
+ if run_smooth_actions_record is None:
+ sys.stderr.write('Raw tracing data:\n')
+ sys.stderr.write(repr(self._tracing_timeline_data.EventData()))
+ sys.stderr.write('\n')
+ raise Exception('SmoothnessController failed to issue markers for the '
+ 'whole interaction.')
+ else:
+ smooth_records = [run_smooth_actions_record]
# Create an interaction_record for this legacy measurement. Since we don't
# wrap the results that is sent to smoothnes metric, the logical_name will
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698