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

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

Issue 16438003: Android / Telemetry: make surface_stats_collector more robust. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: is None 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 82ab2524dd3c033afce0d4f2efaefc8ba8bf62d3..d5709fffe7d72159f45e5824cfcf075fc8f949e4 100644
--- a/build/android/pylib/surface_stats_collector.py
+++ b/build/android/pylib/surface_stats_collector.py
@@ -64,12 +64,21 @@ class SurfaceStatsCollector(object):
def SampleResults(self):
self._StorePerfResults()
- results = self._results
+ results = self.GetResults()
self._results = []
return results
def GetResults(self):
- return self._results
+ return self._results or self._GetEmptyResults()
+
+ def _GetEmptyResults(self):
+ return [
+ SurfaceStatsCollector.Result('refresh_period', None, 'seconds'),
+ SurfaceStatsCollector.Result('jank_count', None, 'janks'),
+ SurfaceStatsCollector.Result('max_frame_delay', None, 'vsyncs'),
+ SurfaceStatsCollector.Result('frame_lengths', None, 'vsyncs'),
+ SurfaceStatsCollector.Result('avg_surface_fps', None, 'fps')
+ ]
@staticmethod
def _GetNormalizedDeltas(data, refresh_period):
« 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