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

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

Issue 170183004: Move smoothness to the new API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit
Patch Set: Created 6 years, 9 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/timeline_based_measurement.py
diff --git a/tools/perf/measurements/timeline_based_measurement.py b/tools/perf/measurements/timeline_based_measurement.py
index a9e1ecc78bf3d3bc990d03c1e578ffec3b31ffc6..a726dc3b070fbc5002431c63b599f6e9cb0ac4bd 100644
--- a/tools/perf/measurements/timeline_based_measurement.py
+++ b/tools/perf/measurements/timeline_based_measurement.py
@@ -4,11 +4,11 @@
from metrics import timeline as timeline_module
from metrics import timeline_interaction_record as tir_module
+from metrics import smoothness
from telemetry.page import page_measurement
from telemetry.core.timeline import model as model_module
-
# TimelineBasedMeasurement considers all instrumentation as producing a single
# timeline. But, depending on the amount of instrumentation that is enabled,
# overhead increases. The user of the measurement must therefore chose between
@@ -31,14 +31,14 @@ class _TimelineBasedMetrics(object):
def FindTimelineInteractionRecords(self):
# TODO(nduca): Add support for page-load interaction record.
- return [tir_module.TimelineInteractionRecord(event) for
+ return [tir_module.TimelineInteractionRecord.FromEvent(event) for
event in self._renderer_thread.IterAllAsyncSlices()
if tir_module.IsTimelineInteractionRecord(event.name)]
def CreateMetricsForTimelineInteractionRecord(self, interaction):
res = []
if interaction.is_smooth:
- pass # TODO(nduca): res.append smoothness metric instance.
+ res.append(smoothness.SmoothnessMetric())
return res
def AddResults(self, results):

Powered by Google App Engine
This is Rietveld 408576698