summaryrefslogtreecommitdiff
path: root/tests/workloads/recentfling.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/workloads/recentfling.sh')
-rwxr-xr-xtests/workloads/recentfling.sh64
1 files changed, 41 insertions, 23 deletions
diff --git a/tests/workloads/recentfling.sh b/tests/workloads/recentfling.sh
index 68fdb2ff..092c8d92 100755
--- a/tests/workloads/recentfling.sh
+++ b/tests/workloads/recentfling.sh
@@ -44,6 +44,12 @@ case $DEVICE in
upCount=6
UP="70 400 70 100 $flingtime"
DOWN="70 100 70 400 $flingtime";;
+(bullhead)
+ flingtime=200
+ downCount=5
+ upCount=5
+ UP="500 1200 500 550 $flingtime"
+ DOWN="500 550 500 1200 $flingtime";;
(volantis)
flingtime=400
downCount=5
@@ -66,20 +72,6 @@ if [ $startapps -gt 0 ]; then
done
fi
-cur=1
-
-set -- $(getJankyFrames)
-totalFrames=$1
-jankyFrames=$2
-frameSum=0
-jankSum=0
-
-if [ ${totalFrames:=0} -eq 0 ]; then
-#echo Error: could not read frame info with \"dumpsys graphicsstats\"
- echo Error: could not read frame info with \"dumpsys gfxinfo\"
- exit 1
-fi
-
function swipe {
count=0
while [ $count -lt $2 ]
@@ -89,14 +81,25 @@ function swipe {
done
}
+cur=1
+frameSum=0
+jankSum=0
+latency90Sum=0
+latency95Sum=0
+latency99Sum=0
+
echo Fling recents...
-doKeyevent APP_SWITCH
+doKeyevent HOME
+sleep 0.5
+resetJankyFrames
while [ $cur -le $iterations ]
do
if [ $capturesystrace -gt 0 ]; then
${ADB}atrace --async_start -z -c -b 16000 freq gfx view idle sched
fi
+ doKeyevent APP_SWITCH
+ sleep 0.5
swipe "$DOWN" $downCount
sleep 1
swipe "$UP" $upCount
@@ -108,25 +111,40 @@ do
if [ $capturesystrace -gt 0 ]; then
${ADB}atrace --async_dump -z -c -b 16000 freq gfx view idle sched > trace.${cur}.out
fi
+ doKeyevent HOME
+ sleep 0.5
set -- $(getJankyFrames)
- newTotalFrames=$1
- newJankyFrames=$2
- ((totalDiff=newTotalFrames-totalFrames))
+ totalDiff=$1
+ jankyDiff=$2
+ latency90=$3
+ latency95=$4
+ latency99=$5
+ if [ ${totalDiff:=0} -eq 0 ]; then
+ echo Error: could not read frame info with \"dumpsys gfxinfo\"
+ exit 1
+ fi
+
((frameSum=frameSum+totalDiff))
- ((jankyDiff=newJankyFrames-jankyFrames))
((jankSum=jankSum+jankyDiff))
+ ((latency90Sum=latency90Sum+latency90))
+ ((latency95Sum=latency95Sum+latency95))
+ ((latency99Sum=latency99Sum+latency99))
if [ "$totalDiff" -eq 0 ]; then
echo Error: no frames detected. Is the display off?
exit 1
fi
((jankPct=jankyDiff*100/totalDiff))
- totalFrames=$newTotalFrames
- jankyFrames=$newJankyFrames
+ resetJankyFrames
- echo Frames: $totalDiff Janks: $jankyDiff \(${jankPct}%\)
+ echo Frames: $totalDiff latency: $latency90/$latency95/$latency99 Janks: $jankyDiff\(${jankPct}%\)
((cur=cur+1))
done
doKeyevent HOME
((aveJankPct=jankSum*100/frameSum))
-echo AVE: Frames: $frameSum Janks: $jankSum \(${aveJankPct}%\)
+((aveJanks=jankSum/iterations))
+((aveFrames=frameSum/iterations))
+((aveLatency90=latency90Sum/iterations))
+((aveLatency95=latency95Sum/iterations))
+((aveLatency99=latency99Sum/iterations))
+echo AVE: Frames: $aveFrames latency: $aveLatency90/$aveLatency95/$aveLatency99 Janks: $aveJanks\(${aveJankPct}%\)