summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@google.com>2015-06-05 14:56:54 -0700
committerTodd Kjos <tkjos@google.com>2015-06-05 14:56:54 -0700
commit643233ded9075628010c16feb8d2401ade3ae62c (patch)
tree0fa63ca893fe3dd63b4e0d29de26833397b73840
parent8b6cf2796dc179b339b12e52d17b56d2519358fe (diff)
downloadextras-643233ded9075628010c16feb8d2401ade3ae62c.tar.gz
Add -W option to systemapps.sh
Changes the wait time between apps. Example; "./systemapps.sh -W 1.2" Change-Id: I3769aa93ebbcd129de2f3fa3df99720e1d83b2f9
-rwxr-xr-xtests/workloads/systemapps.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/workloads/systemapps.sh b/tests/workloads/systemapps.sh
index bd971488..0978dbd9 100755
--- a/tests/workloads/systemapps.sh
+++ b/tests/workloads/systemapps.sh
@@ -26,6 +26,7 @@ iterations=1
tracecategories="gfx view am input memreclaim"
totaltimetest=0
forcecoldstart=0
+waitTime=3.0
appList="gmail hangouts chrome youtube play home"
@@ -36,6 +37,7 @@ function processLocalOption {
(-F) forcecoldstart=1;;
(-L) appList=$2; shift; ret=1;;
(-T) totaltimetest=1;;
+ (-W) waitTime=$2; shift; ret=1;;
(*)
echo "$0: unrecognized option: $1"
echo; echo "Usage: $0 [options]"
@@ -44,6 +46,7 @@ function processLocalOption {
echo "-L applist : list of applications"
echo " default: $appList"
echo "-T : total time to start all apps"
+ echo "-W : time to wait between apps"
echo "-g : generate activity strings"
echo "-i iterations"
echo "-n : keep trace files"
@@ -169,10 +172,8 @@ do
t=$(forceStartActivity $app)
fi
- loopEndTimestamp=$(date +"%s %N")
- diffTime=$(computeTimeDiff $loopTimestamp $loopEndTimestamp)
# let app finish drawing before checking janks
- sleep 3
+ sleep $waitTime
set -- $(getJankyFrames $(getPackageName $app))
frames=$1
janks=$2
@@ -190,6 +191,10 @@ do
((l90=l90+s90))
((l95=l95+s95))
((l99=l99+s99))
+
+ loopEndTimestamp=$(date +"%s %N")
+ diffTime=$(computeTimeDiff $loopTimestamp $loopEndTimestamp)
+
if [ $frames -eq 0 ]; then
janks=0
jankPct=0