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

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

Issue 12432006: [telemetry] Fix Android surface statistics collector (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a typo while we're at it. Created 7 years, 9 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 | tools/telemetry/telemetry/core/chrome/android_browser_finder.py » ('j') | 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 cf5a280c894608e3c4a0eebaa9591c7008da0ba9..8d8c9927cf016ae661084f2ecb73551977293c87 100644
--- a/build/android/pylib/surface_stats_collector.py
+++ b/build/android/pylib/surface_stats_collector.py
@@ -17,17 +17,13 @@ _SURFACE_TEXTURE_TIMESTAMP_RE = '\d+'
class SurfaceStatsCollector(object):
- """Collects surface stats for a window from the output of SurfaceFlinger.
+ """Collects surface stats for a SurfaceView from the output of SurfaceFlinger.
Args:
- adb: the adb coonection to use.
- window_package: Package name of the window.
- window_activity: Activity name of the window.
+ adb: the adb connection to use.
"""
- def __init__(self, adb, window_package, window_activity, trace_tag):
+ def __init__(self, adb, trace_tag):
self._adb = adb
- self._window_package = window_package
- self._window_activity = window_activity
self._trace_tag = trace_tag
self._collector_thread = None
self._use_legacy_method = False
@@ -151,8 +147,7 @@ class SurfaceStatsCollector(object):
# The command returns nothing if it is supported, otherwise returns many
# lines of result just like 'dumpsys SurfaceFlinger'.
results = self._adb.RunShellCommand(
- 'dumpsys SurfaceFlinger --latency-clear %s/%s' %
- (self._window_package, self._window_activity))
+ 'dumpsys SurfaceFlinger --latency-clear SurfaceView')
return not len(results)
def _GetSurfaceFlingerLatencyData(self, previous_timestamp, latencies):
@@ -196,9 +191,12 @@ class SurfaceStatsCollector(object):
# (each time the number above changes, we have a "jank").
# If this happens a lot during an animation, the animation appears
# janky, even if it runs at 60 fps in average.
+ #
+ # We use the special "SurfaceView" window name because the statistics for
+ # the activity's main window are not updated when the main web content is
+ # composited into a SurfaceView.
results = self._adb.RunShellCommand(
- 'dumpsys SurfaceFlinger --latency %s/%s' %
- (self._window_package, self._window_activity), log_result=True)
+ 'dumpsys SurfaceFlinger --latency SurfaceView', log_result=True)
if not len(results):
return (None, None)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/chrome/android_browser_finder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698