iOS性能测试

使用tidevice

github: https://github.com/alibaba/taobao-iphone-device/blob/main/README.md

 

import tidevice
import time
from tidevice._perf import DataType

t = tidevice.Device()
# perf = tidevice.Performance(t, [DataType.CPU, DataType.MEMORY, DataType.NETWORK, DataType.FPS, DataType.PAGE, DataType.SCREENSHOT])
perf = tidevice.Performance(t, [DataType.CPU, DataType.MEMORY])
# tidevice version <= 0.4.16:
# perf = tidevice.Performance(t)


def callback(_type: tidevice.DataType, value: dict):
print("R:", _type.value, value)


perf.start("com.haohan.hhbusiness", callback=callback)
time.sleep(30)
perf.stop()

posted on 2022-02-16 09:56  阿虾  阅读(143)  评论(0编辑  收藏  举报

导航