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

Side by Side Diff: build/android/pylib/cache_control.py

Issue 23681011: Android: splits cache_control and perf_control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/pylib/perf_control.py » ('j') | build/android/pylib/perf_control.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
frankf 2013/09/16 18:09:23 Can we move all perf-specific modules to perf/ dir
dtu 2013/09/16 18:36:59 Feel free to put them in telemetry/core/platform/a
bulach 2013/09/16 19:51:10 good point, moved to build/android/pylib/perf rea
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import android_commands
6
7
8 class CacheControl(object):
9 _DROP_CACHES = '/proc/sys/vm/drop_caches'
10
11 def __init__(self, adb):
12 self._adb = adb
13
14 def DropRamCaches(self):
15 """Drops the filesystem ram caches for performance testing."""
16 self._adb.RunShellCommand('su -c sync')
frankf 2013/09/16 18:09:23 Can we add a RunShellCommandAsRoot('sync')? It hel
bulach 2013/09/16 19:51:10 Done.
17 self._adb.SetProtectedFileContents(CacheControl._DROP_CACHES, '3')
18
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/perf_control.py » ('j') | build/android/pylib/perf_control.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698