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

Unified Diff: tools/telemetry/telemetry/web_perf/metrics/smoothness.py

Issue 645753002: telemetry: Replace mostly_smooth by percentage_smooth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/telemetry/telemetry/web_perf/metrics/smoothness.py
diff --git a/tools/telemetry/telemetry/web_perf/metrics/smoothness.py b/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
index 73dca043facc3432dbd6b0651d91e199fb5e7423..32f8694fbab8fd8a12405e60b59c6c37fa80ba89 100644
--- a/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
+++ b/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
@@ -30,7 +30,7 @@ class SmoothnessMetric(timeline_based_metric.TimelineBasedMetric):
frame_times: A list of raw frame times
mean_frame_time: The arithmetic mean of frame times
- mostly_smooth: Whether we hit 60 fps for 95% of all frames
+ percentage_smooth: Percentage of frames that were hitting 60 FPS.
jank: The absolute discrepancy of frame timestamps
mean_pixels_approximated: The mean percentage of pixels approximated
queueing_durations: The queueing delay between compositor & main threads
@@ -146,19 +146,20 @@ class SmoothnessMetric(timeline_based_metric.TimelineBasedMetric):
def _ComputeFrameTimeMetric(self, page, stats):
"""Returns Values for the frame time metrics.
- This includes the raw and mean frame times, as well as the mostly_smooth
- metric which tracks whether we hit 60 fps for 95% of the frames.
+ This includes the raw and mean frame times, as well as the percentage of
+ frames that were hitting 60 fps.
qyearsley 2014/10/10 04:02:21 Since smooth_threshold below is 19.0, is this actu
ernstm 2014/10/10 20:13:08 I lowered the threshold to 17.0ms. We will be able
"""
frame_times = None
mean_frame_time = None
- mostly_smooth = None
+ percentage_smooth = None
none_value_reason = None
if self._HasEnoughFrames(stats.frame_timestamps):
frame_times = FlattenList(stats.frame_times)
mean_frame_time = round(statistics.ArithmeticMean(frame_times), 3)
# We use 19ms as a somewhat looser threshold, instead of 1000.0/60.0.
- percentile_95 = statistics.Percentile(frame_times, 95.0)
- mostly_smooth = 1.0 if percentile_95 < 19.0 else 0.0
+ smooth_threshold = 19.0
+ smooth_count = sum(1 for t in frame_times if t < smooth_threshold)
+ percentage_smooth = float(smooth_count) / len(frame_times) * 100.0
else:
none_value_reason = NOT_ENOUGH_FRAMES_MESSAGE
return (
@@ -172,9 +173,8 @@ class SmoothnessMetric(timeline_based_metric.TimelineBasedMetric):
description='Arithmetic mean of frame times.',
none_value_reason=none_value_reason),
scalar.ScalarValue(
- page, 'mostly_smooth', 'score', mostly_smooth,
- description='Were 95 percent of the frames hitting 60 fps?'
- 'boolean value (1/0).',
+ page, 'percentage_smooth', 'score', percentage_smooth,
+ description='Percentage of frames that were hitting 60 fps.',
none_value_reason=none_value_reason)
)
« no previous file with comments | « tools/perf/measurements/smoothness_unittest.py ('k') | tools/telemetry/telemetry/web_perf/metrics/smoothness_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698