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

Side by Side Diff: tools/perf/metrics/smoothness.py

Issue 124103002: telemetry: Add unit 'score' to 'mostly_smooth' metric. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from metrics import Metric 5 from metrics import Metric
6 from metrics import rendering_stats 6 from metrics import rendering_stats
7 from metrics import statistics 7 from metrics import statistics
8 from telemetry.page import page_measurement 8 from telemetry.page import page_measurement
9 9
10 TIMELINE_MARKER = 'Smoothness' 10 TIMELINE_MARKER = 'Smoothness'
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 len(self._stats.frame_times)) 72 len(self._stats.frame_times))
73 results.Add('mean_frame_time', 'ms', round(mean_frame_time, 3)) 73 results.Add('mean_frame_time', 'ms', round(mean_frame_time, 3))
74 74
75 # Absolute discrepancy of frame time stamps. 75 # Absolute discrepancy of frame time stamps.
76 jank = statistics.FrameDiscrepancy(self._stats.frame_timestamps) 76 jank = statistics.FrameDiscrepancy(self._stats.frame_timestamps)
77 results.Add('jank', '', round(jank, 4)) 77 results.Add('jank', '', round(jank, 4))
78 78
79 # Are we hitting 60 fps for 95 percent of all frames? 79 # Are we hitting 60 fps for 95 percent of all frames?
80 # We use 19ms as a somewhat looser threshold, instead of 1000.0/60.0. 80 # We use 19ms as a somewhat looser threshold, instead of 1000.0/60.0.
81 percentile_95 = statistics.Percentile(self._stats.frame_times, 95.0) 81 percentile_95 = statistics.Percentile(self._stats.frame_times, 95.0)
82 results.Add('mostly_smooth', '', 1.0 if percentile_95 < 19.0 else 0.0) 82 results.Add('mostly_smooth', 'score', 1.0 if percentile_95 < 19.0 else 0.0)
fmeawad 2014/01/03 19:39:47 Would '%' also work? is it a percentile?
ernstm 2014/01/04 01:08:47 It is a binary value (0 or 1), so score seemed the
83 83
84 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 84 if tab.browser.platform.IsRawDisplayFrameRateSupported():
85 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): 85 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements():
86 if r.value is None: 86 if r.value is None:
87 raise MissingDisplayFrameRateError(r.name) 87 raise MissingDisplayFrameRateError(r.name)
88 results.Add(r.name, r.unit, r.value) 88 results.Add(r.name, r.unit, r.value)
OLDNEW
« 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