OLD | NEW |
---|---|
(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 | |
OLD | NEW |