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

Unified Diff: build/android/surface_stats.py

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « build/android/rezip/RezipApk.java ('k') | build/android/symbolize.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/surface_stats.py
diff --git a/build/android/surface_stats.py b/build/android/surface_stats.py
index 74bfdcee4934ab3a4e76e1273c8aa8ef59ec8bb8..911dd2e557509889c89cc0add41ede1f93c089b7 100755
--- a/build/android/surface_stats.py
+++ b/build/android/surface_stats.py
@@ -13,6 +13,8 @@ import optparse
import sys
import time
+from pylib.device import adb_wrapper
+from pylib.device import device_errors
from pylib.device import device_utils
from pylib.perf import surface_stats_collector
from pylib.utils import run_tests_helper
@@ -98,7 +100,14 @@ def main(argv):
options, _ = parser.parse_args(argv)
run_tests_helper.SetLogLevel(options.verbose_count)
- device = device_utils.DeviceUtils(options.device)
+ if options.device:
+ device = device_utils.DeviceUtils(options.device)
+ else:
+ devices = adb_wrapper.AdbWrapper.GetDevices()
+ if not devices:
+ raise device_errors.NoDevicesError
+ device = device_utils.DeviceUtils(devices[0])
+
collector = surface_stats_collector.SurfaceStatsCollector(device)
collector.DisableWarningAboutEmptyData()
« no previous file with comments | « build/android/rezip/RezipApk.java ('k') | build/android/symbolize.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698