YueChen-C / py-ios-device

IOS Professional Performance Testing Tool . You can get CPU, GPU, Memory , Lifecycle and other metrics from real iOS devices . iOS 性能测试工具
GNU General Public License v3.0
667 stars 183 forks source link

Availability of Performance Data for iOS Tunnel Created in Userspace Mode #157

Open myungkyojung opened 6 days ago

myungkyojung commented 6 days ago

Can performance data be retrieved when creating a tunnel using ios tunnel start --userspace instead of sudo ios tunnel start? Or are there any plans for further development?

YueChen-C commented 5 days ago

Let me study it

myungkyojung commented 5 days ago

Thanks.

YueChen-C commented 5 days ago
# ios tunnel start --userspace
# [{"address":"fd17:cafe:59d4::1","rsdPort":54934,"udid":"00008101-0018242C3XXXXXXXXX","userspaceTun":true,"userspaceTunPort":60106}]

host = 'fd17:cafe:59d4::1'
port = 54934  
with RemoteLockdownClient((host, port), userspace_port=60106) as rsd:
    rpc = InstrumentServer(rsd).init()
    sysmontap(rpc)
    rpc.stop()
myungkyojung commented 5 days ago

I just tested it, and the attached code works properly. Has everything been implemented for performance information(cpu, memory, network...) retrieval? Also, do you have any plans to support a CLI for iOS 17?"

YueChen-C commented 5 days ago

All features should be supported. I don't want to spend too much time supporting the CLI...

myungkyojung commented 4 days ago

@YueChen-C I am writing a python script to retrieve performance information for iOS 17.
Should I explicitly release the RemoteLockdownClient and InstrumentServer objects when receiving SIGINT or SIGTERM signals for a graceful shutdown, or will they be automatically released when the script terminates?

YueChen-C commented 4 days ago

RemoteLockdownClient connections can be reused by multiple InstrumentServers.

Some InstrumentServers services can only enable one , otherwise it will affect the system operation such as com.apple.instruments.remoteserver.DVTSecureSocketProxy. I recommend releasing it immediately after use