summaryrefslogtreecommitdiff
path: root/startop/scripts/app_startup/lib/adb_utils.py
diff options
context:
space:
mode:
authorYan Wang <yawanng@google.com>2019-08-08 18:28:32 -0700
committerYan Wang <yawanng@google.com>2019-08-08 18:34:36 -0700
commit2ae4f03578891bd51aab0d665955e268ff06b27a (patch)
tree4c3fca03cf629ae2a64a019e875ea511229748e2 /startop/scripts/app_startup/lib/adb_utils.py
parent72a487722f106bfc60f19f8e9fd6aedf3778b167 (diff)
startop: Change trace duration in compiler.py to timedelta.
The time in timestamp is second, while the trace duration is millisecond. Using timedelta to fix this ambiguity. Test: pytest compiler_test.py Change-Id: I6c445c3dac1b60aec77ead14df021b8a2dda7b5e
Diffstat (limited to 'startop/scripts/app_startup/lib/adb_utils.py')
-rw-r--r--startop/scripts/app_startup/lib/adb_utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/startop/scripts/app_startup/lib/adb_utils.py b/startop/scripts/app_startup/lib/adb_utils.py
index 1c60a17ada1b..e56a96848895 100644
--- a/startop/scripts/app_startup/lib/adb_utils.py
+++ b/startop/scripts/app_startup/lib/adb_utils.py
@@ -42,6 +42,8 @@ def logcat_save_timestamp() -> str:
def vm_drop_cache():
"""Free pagecache and slab object."""
cmd_utils.run_adb_shell_command('echo 3 > /proc/sys/vm/drop_caches')
+ # Sleep a little bit to provide enougth time for cache cleanup.
+ time.sleep(2)
def root():
"""Roots adb and successive adb commands will run under root."""