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

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

Issue 18341006: SurfaceStats / Telemetry: calculate FPS in different frame buckets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 7 years, 6 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 | build/android/surface_stats.py » ('j') | build/android/surface_stats.py » ('J')
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 d5709fffe7d72159f45e5824cfcf075fc8f949e4..00516fedd3d13d4a405f1d45e5ec4ee479dc0564 100644
--- a/build/android/pylib/surface_stats_collector.py
+++ b/build/android/pylib/surface_stats_collector.py
@@ -85,6 +85,15 @@ class SurfaceStatsCollector(object):
deltas = [t2 - t1 for t1, t2 in zip(data, data[1:])]
return (deltas, [delta / refresh_period for delta in deltas])
+ def _CalcFpsInBuckets(self, timestamps):
+ for pct in [0.9, 0.5]:
+ sliced = timestamps[int(-pct * len(timestamps)) + 3 : ]
Sami 2013/07/03 15:11:50 Probably want to bail out here if there were too f
bulach 2013/07/03 18:09:15 when is the "legacy" method used? the non-legacy g
Sami 2013/07/03 18:21:37 Ah, good point. The legacy path is only used on pr
+ seconds = sliced[-1] - sliced[0]
+ frame_count = len(sliced)
+ self._results.append(SurfaceStatsCollector.Result(
+ 'avg_surface_fps_' + str(pct).replace('.', '_'),
Sami 2013/07/03 15:11:50 int(pct * 100) would gives nicer names I think :)
bulach 2013/07/03 18:09:15 indeed! done.
+ int(round(frame_count / seconds)), 'fps'))
+
def _StorePerfResults(self):
if self._use_legacy_method:
surface_after = self._GetSurfaceStatsLegacy()
@@ -122,6 +131,7 @@ class SurfaceStatsCollector(object):
'frame_lengths', normalized_frame_lengths, 'vsyncs'))
self._results.append(SurfaceStatsCollector.Result(
'avg_surface_fps', int(round(frame_count / seconds)), 'fps'))
+ self._CalcFpsInBuckets(timestamps)
Sami 2013/07/03 15:11:50 If we decide to go ahead with this, let's include
bulach 2013/07/03 18:09:15 I need to understand this better though: they all
Sami 2013/07/03 18:21:37 |refresh_period| is a constant given by the displa
def _CollectorThread(self):
last_timestamp = 0
« no previous file with comments | « no previous file | build/android/surface_stats.py » ('j') | build/android/surface_stats.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698