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

Unified Diff: tools/perf/metrics/smoothness.py

Issue 132433004: Collecting LatencyInfo in telemetry (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix presubmit error "unused variable" Created 6 years, 10 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 | « tools/perf/metrics/rendering_stats_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/smoothness.py
diff --git a/tools/perf/metrics/smoothness.py b/tools/perf/metrics/smoothness.py
index 2645e807cf94e3513e4e2232e939953f2a406ace..710c9d58481f37a5a8458168f34f10f639694a2d 100644
--- a/tools/perf/metrics/smoothness.py
+++ b/tools/perf/metrics/smoothness.py
@@ -66,7 +66,7 @@ class SmoothnessMetric(Metric):
renderer_process = timeline_model.GetRendererProcessFromTab(tab)
self._stats = rendering_stats.RenderingStats(
- renderer_process, timeline_ranges)
+ renderer_process, timeline_model.browser_process, timeline_ranges)
if not self._stats.frame_times:
raise NotEnoughFramesError()
@@ -78,6 +78,20 @@ class SmoothnessMetric(Metric):
self._stats = stats
def AddResults(self, tab, results):
+ if self._stats.mouse_wheel_scroll_latency:
+ mean_mouse_wheel_scroll_latency = statistics.ArithmeticMean(
+ self._stats.mouse_wheel_scroll_latency,
+ len(self._stats.mouse_wheel_scroll_latency))
+ results.Add('mean_mouse_wheel_scroll_latency', 'ms',
+ round(mean_mouse_wheel_scroll_latency, 3))
+
+ if self._stats.touch_scroll_latency:
+ mean_touch_scroll_latency = statistics.ArithmeticMean(
+ self._stats.touch_scroll_latency,
+ len(self._stats.touch_scroll_latency))
+ results.Add('mean_touch_scroll_latency', 'ms',
+ round(mean_touch_scroll_latency, 3))
+
# List of raw frame times.
frame_times = FlattenList(self._stats.frame_times)
results.Add('frame_times', 'ms', frame_times)
« no previous file with comments | « tools/perf/metrics/rendering_stats_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698