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

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

Issue 268803002: re-land: telemetry: Add approximated pixels percentage to smoothness. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « tools/perf/metrics/rendering_stats_unittest.py ('k') | 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 timeline_based_metric 5 from metrics import timeline_based_metric
6 from metrics import rendering_stats 6 from metrics import rendering_stats
7 from telemetry.page.perf_tests_helper import FlattenList 7 from telemetry.page.perf_tests_helper import FlattenList
8 from telemetry.util import statistics 8 from telemetry.util import statistics
9 9
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 # Absolute discrepancy of frame time stamps. 58 # Absolute discrepancy of frame time stamps.
59 frame_discrepancy = statistics.TimestampsDiscrepancy( 59 frame_discrepancy = statistics.TimestampsDiscrepancy(
60 stats.frame_timestamps) 60 stats.frame_timestamps)
61 results.Add('jank', 'ms', round(frame_discrepancy, 4)) 61 results.Add('jank', 'ms', round(frame_discrepancy, 4))
62 62
63 # Are we hitting 60 fps for 95 percent of all frames? 63 # Are we hitting 60 fps for 95 percent of all frames?
64 # We use 19ms as a somewhat looser threshold, instead of 1000.0/60.0. 64 # We use 19ms as a somewhat looser threshold, instead of 1000.0/60.0.
65 percentile_95 = statistics.Percentile(frame_times, 95.0) 65 percentile_95 = statistics.Percentile(frame_times, 95.0)
66 results.Add('mostly_smooth', 'score', 1.0 if percentile_95 < 19.0 else 0.0) 66 results.Add('mostly_smooth', 'score', 1.0 if percentile_95 < 19.0 else 0.0)
67
68 # Mean percentage of pixels approximated (missing tiles, low resolution
69 # tiles, non-ideal resolution tiles)
70 results.Add('mean_pixels_approximated', 'percent',
71 round(statistics.ArithmeticMean(
72 FlattenList(stats.approximated_pixel_percentages)), 3))
OLDNEW
« 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