Skip to content

Instantly share code, notes, and snippets.

@dtmilano
Created June 27, 2017 23:26
Show Gist options
  • Save dtmilano/e1f237ff2d6853bd6b39db985d32b642 to your computer and use it in GitHub Desktop.
Save dtmilano/e1f237ff2d6853bd6b39db985d32b642 to your computer and use it in GitHub Desktop.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import re
import sys
import os
try:
sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
except:
pass
from com.dtmilano.android.viewclient import ViewClient
from com.dtmilano.android.adb.dumpsys import Dumpsys
from com.dtmilano.android.plot import Plot
try:
pkg = sys.argv.pop(1)
except:
sys.exit('usage: %s <package> [serialno]' % sys.argv[0])
device, serialno = ViewClient.connectToDeviceOrExit()
Plot().append(Dumpsys(device, Dumpsys.GFXINFO, pkg, Dumpsys.FRAMESTATS)).plot(_type=Dumpsys.FRAMESTATS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment