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

Unified Diff: build/android/pylib/surface_stats_collector.py

Issue 19055003: Android: uses at least 3 samples for surface stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/surface_stats_collector.py
diff --git a/build/android/pylib/surface_stats_collector.py b/build/android/pylib/surface_stats_collector.py
index 5b1281b4ec0a335f69747b2095d2c05864f5dd7d..14b0379b2dd2b735696a548804c3515159cbd5e5 100644
--- a/build/android/pylib/surface_stats_collector.py
+++ b/build/android/pylib/surface_stats_collector.py
@@ -119,7 +119,7 @@ class SurfaceStatsCollector(object):
def _CalculateBuckets(refresh_period, timestamps):
results = []
for pct in [0.99, 0.5]:
- sliced = timestamps[int(-pct * len(timestamps)) + 3 : ]
+ sliced = timestamps[min(int(-pct * len(timestamps)), -3) : ]
results += SurfaceStatsCollector._CalculateResults(
refresh_period, sliced, '_' + str(int(pct * 100)))
return results
« 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