移动性能测试 solox 获取微信小程序的性能(appbrand0)

拉法 · 2023年04月19日 · 4645 次阅读

安装:pip install solox==2.6.0
https://github.com/smart-test-ti/SoloX

界面获取

cmd: python -m solox

python 获取

from solox.public.apm import APM
from solox.public.common import Devices

d = Devices()
pids = d.getPid(deviceId='ca6bd5a5', pkgName='com.bilibili.app.in') # 获取app的所有存活进程

apm = APM(pkgName='com.bilibili.app.in',deviceId='ca6bd5a5',platform='Android', surfaceview=True, noLog=True, pid=None)
# apm = APM(pkgName='com.bilibili.app.in', platform='iOS') only supports one device
# surfaceview: False = gfxinfo (Developer - GPU rendering mode - adb shell dumpsys gfxinfo)
# noLog : False (Save test data to log file)

cpu = apm.collectCpu() # %
memory = apm.collectMemory() # MB
flow = apm.collectFlow(wifi=True) # KB
fps = apm.collectFps() # HZ
battery = apm.collectBattery() # level:% temperature:°C current:mA voltage:mV power:w
gpu = apm.collectGpu() # % only supports ios

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册