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

Unified Diff: build/android/pylib/perf/cache_control.py

Issue 221823011: [Android] Change object types from AndroidCommands to DeviceUtils in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « build/android/pylib/monkey/test_runner.py ('k') | build/android/pylib/perf/perf_control.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf/cache_control.py
diff --git a/build/android/pylib/perf/cache_control.py b/build/android/pylib/perf/cache_control.py
index 1b0a4c2b95529fa549b2db7b9ac997861b4c5f05..adc3219609a753f63660375649ef64d4332654fe 100644
--- a/build/android/pylib/perf/cache_control.py
+++ b/build/android/pylib/perf/cache_control.py
@@ -2,15 +2,21 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from pylib import android_commands
+from pylib.device import device_utils
class CacheControl(object):
_DROP_CACHES = '/proc/sys/vm/drop_caches'
- def __init__(self, adb):
- self._adb = adb
+ def __init__(self, device):
+ # TODO(jbudorick) Remove once telemetry gets switched over.
+ if isinstance(device, android_commands.AndroidCommands):
+ device = device_utils.DeviceUtils(device)
+ self._device = device
def DropRamCaches(self):
"""Drops the filesystem ram caches for performance testing."""
- self._adb.RunShellCommandWithSU('sync')
- self._adb.SetProtectedFileContents(CacheControl._DROP_CACHES, '3')
+ self._device.old_interface.RunShellCommandWithSU('sync')
+ self._device.old_interface.SetProtectedFileContents(
+ CacheControl._DROP_CACHES, '3')
« no previous file with comments | « build/android/pylib/monkey/test_runner.py ('k') | build/android/pylib/perf/perf_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698