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): |