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

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

Issue 441873007: Move timeline and importers to use telemetry.value.TraceValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: tools/perf/measurements/smoothness_controller.py
diff --git a/tools/perf/measurements/smoothness_controller.py b/tools/perf/measurements/smoothness_controller.py
index b29a1edda5c75953925564a8640737a20515c65e..dc2e572a6100af77c3a7f4ae89480b2c91e649ea 100644
--- a/tools/perf/measurements/smoothness_controller.py
+++ b/tools/perf/measurements/smoothness_controller.py
@@ -30,7 +30,7 @@ class MissingDisplayFrameRateError(page_measurement.MeasurementFailure):
class SmoothnessController(object):
def __init__(self):
self._timeline_model = None
- self._tracing_timeline_data = None
+ self._trace_value = None
self._interaction = None
def SetUp(self, page, tab):
@@ -54,9 +54,8 @@ class SmoothnessController(object):
# Stop tracing for smoothness metric.
if tab.browser.platform.IsRawDisplayFrameRateSupported():
tab.browser.platform.StopRawDisplayFrameRateMeasurement()
- self._tracing_timeline_data = tab.browser.StopTracing()
- self._timeline_model = TimelineModel(
- timeline_data=self._tracing_timeline_data)
+ self._trace_value = tab.browser.StopTracing()
+ self._timeline_model = TimelineModel(self._trace_value)
def AddResults(self, tab, results):
# Add results of smoothness metric. This computes the smoothness metric for
@@ -88,7 +87,7 @@ class SmoothnessController(object):
if len(smooth_records) == 0:
if run_smooth_actions_record is None:
sys.stderr.write('Raw tracing data:\n')
- sys.stderr.write(repr(self._tracing_timeline_data.EventData()))
+ self._trace_value.Serialize(sys.stderr)
sys.stderr.write('\n')
raise Exception('SmoothnessController failed to issue markers for the '
'whole interaction.')

Powered by Google App Engine
This is Rietveld 408576698