IOS Professional Performance Testing Tool . You can get CPU, GPU, Memory , Lifecycle and other metrics from real iOS devices . iOS 性能测试工具
IOS Professional Performance Testing Tool . You can get CPU, GPU, Memory , Lifecycle and other metrics from real iOS devices . iOS 性能测试工具
A python based Apple instruments protocol,you can get CPU, Memory and other metrics from real iOS devices
link: https://testerhome.com/topics/27159
Java link: https://github.com/YueChen-C/java-ios-device)
pip install py-ios-device
python version: 3.7 +
pyidevice --help pyidevice instruments --help
$ pyidevice devices
$ pyidevice deviceinfo --udid=xxxxxx
…
$ pyidevice instruments appmonitor -b cn.rongcloud.im
{'Pid': 30897, 'Name': 'SealTalk', 'CPU': '0 %', 'Memory': '35.72 MiB', 'DiskReads': '24.12 MiB', 'DiskWrites': '2.28 MiB', 'Threads': 13}
{'Pid': 30897, 'Name': 'SealTalk', 'CPU': '3.4 %', 'Memory': '35.72 MiB', 'DiskReads': '24.12 MiB', 'DiskWrites': '2.30 MiB', 'Threads': 13}
$ pyidevice instruments sysmontap --help
$ pyidevice instruments sysmontap -b com.tencent.xin --proc_filter physFootprint,cpuUsage --processes --sort cpuUsage # 只显示 memVirtualSize,cpuUsage 参数的进程列表,且根据 cpuUsage 字段排序
[('WeChat', {'cpuUsage': 0.03663705586691998, 'physFootprint': 2179284992, 'name': 'WeChat', 'pid': 99269})]
[('WeChat', {'cpuUsage': 0.036558268613227536, 'physFootprint': 2179284992, 'name': 'WeChat', 'pid': 99269})]
$ pyidevice instruments condition get
# Get device configuration information
$ pyidevice instruments condition set -c SlowNetworkCondition -p SlowNetwork2GUrban
# Set the device network status. eg: 2G, 3G ,100% Loss
$ pyidevice instruments condition set -c ThermalCondition -p ThermalCritical
# Set the device behaves as though under a high thermal state
…
$ pyidevice instruments stackshot --out stackshot.log
$ pyidevice instruments instruments core_profile --pid=1107
SealTalk(1107) PERF_THD_CSwitch (0x25010014) DBG_PERF PERF_DATA DBG_FUNC_NONE
SealTalk(1107) MACH_DISPATCH (0x1400080) DBG_MACH DBG_MACH_SCHED DBG_FUNC_NONE
SealTalk(1107) DecrSet (0x1090004) DBG_MACH DBG_MACH_EXCP_DECI DBG_FUNC_NONE
…
$ pyidevice instruments app_lifecycle -b cn.rongcloud.im
31.20 ms Initializing-System Interface Initialization (Dyld init)
14.33 ms Initializing-Static Runtime Initialization
35.68 ms Launching-UIKit Initialization
810.46 us Launching-UIKit Scene Creation
100.64 ms Launching-didFinishLaunchingWithOptions()
2.91 ms Launching-UIKit Scene Creation
21.85 ms Launching-Initial Frame Rendering
App Thread Process ID:6506076, Total Time:207.41 ms
…
$ pyidevice syslog
# --path
# --filter
$ pyidevice crash list
['.', '..', 'com.apple.appstored', 'JetsamEvent-2021-05-12-112126.ips']
$ pyidevice crash export --name JetsamEvent-2021-05-12-112126.ips
$ pyidevice crash delete --name JetsamEvent-2021-05-12-112126.ips
$ pyidevice crash shell
$ pyidevice apps list
$ pyidevice apps install --ipa_path
$ pyidevice apps uninstall --bundle_id
$ pyidevice apps launch --bundle_id
$ pyidevice apps kill --bundle_id
$ pyidevice apps shell
$ pyidevice pcapd ./test/test.pacp
$ pyidevice pcapd - | "/Applications/Wireshark.app/Contents/MacOS/Wireshark" -k -i -
# mac forword Wireshark
$ pyidevice pcapd - | "D:\Program Files\Wireshark\Wireshark.exe" -k -i -
# win forword Wireshark
$ pyidevice battery
# [Battery] time=1622777708, current=-71, voltage=4330, power=-307.43, temperature=3279
$ pyidevice enable_developer_mode
from ios_device.cli.base import InstrumentsBase
from ios_device.util.dtx_msg import DTXMessage
with InstrumentsBase() as rpc:
def sysmontap_callback(res: DTXMessage):
print(res.selector, res.auxiliaries)
rpc.process_attributes = ['name', 'pid']
rpc.system_attributes = rpc.device_info.sysmonSystemAttributes()
rpc.sysmontap(sysmontap_callback)
QQ :37042417
No open issues yet, or sync has not completed.