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 |