#!/system/bin/sh
# Frame stats for one app over a fixed window: run, then scroll the app the same way each time.
# Usage: sh jank-sample.sh [package] [seconds]
PKG=${1:-com.android.systemui}
SECS=${2:-15}
dumpsys gfxinfo "$PKG" reset > /dev/null
echo "Scroll $PKG now for $SECS s"
sleep "$SECS"
dumpsys gfxinfo "$PKG" | grep -E "Total frames rendered|Janky frames|50th|90th|95th|99th" | head -8
