gidevice icon indicating copy to clipboard operation
gidevice copied to clipboard

feat: get performance data for cpu/memory/gpu/fps/network

Open debugtalk opened this issue 1 year ago • 0 comments

新增支持 iOS 性能采集(CPU & Mem & GPU & FPS & Network)。

对 #37 的重新进行了实现,采集方式参考了 py-ios-device

system monitor

{"type":"sys_cpu","timestamp":1665559008,"nice_load":0,"system_load":-1,"total_load":9.980198019801975,"user_load":-1}
{"type":"sys_mem","timestamp":1665559008,"app_memory":48481,"free_memory":32947,"used_memory":143497,"wired_memory":46897,"cached_files":57381,"compressed":36411,"swap_used":13893632}
{"type":"sys_disk","timestamp":1665559008,"data_read":519033083904,"data_written":88557494272,"reads_in":32944860,"writes_out":6065372}
{"type":"sys_network","timestamp":1665559008,"bytes_in":5749220664,"bytes_out":1641764996,"packets_in":6519608,"packets_out":2494850}

process monitor

get pid 3872 by bundleId com.apple.mobilesafari
{"pid":3872,"proc_perf":{"cpuUsage":4.419134441935455,"memAnon":21905408,"pid":3872},"sys_perf":{"__vmSwapUsage":13893632,"diskBytesRead":519892711424,"diskBytesWritten":88607989760,"diskReadOps":32983419,"diskWriteOps":6068720,"netBytesIn":5751979062,"netBytesOut":1643991471,"netPacketsIn":6521832,"netPacketsOut":2496260,"vmCompressorPageCount":41474,"vmExtPageCount":66269,"vmFreeCount":1644,"vmIntPageCount":65694,"vmPurgeableCount":287,"vmUsedCount":233595,"vmWireCount":50318},"timestamp":1665559084,"type":"process"}

network details

{"type":"network-connection-detected","timestamp":1665559251,"local_address":"10.90.205.249:51577","remote_address":"180.130.120.151:443","interface_index":13,"pid":-2,"recv_buffer_size":4194240,"recv_buffer_used":70590,"serial_number":27,"kind":1}
{"type":"network-connection-detected","timestamp":1665559251,"local_address":"::fdbd:ff1:ce00:1006:1cc3:bcb9:51625","remote_address":"::2408:876c:1780:120:0:0:443","interface_index":13,"pid":-2,"recv_buffer_size":131072,"recv_buffer_used":0,"serial_number":261,"kind":1}
{"type":"network-connection-detected","timestamp":1665559251,"local_address":"::fdbd:ff1:ce00:1006:1cc3:bcb9:51626","remote_address":"0:0:240e:918:8007:::443","interface_index":13,"pid":-2,"recv_buffer_size":131072,"recv_buffer_used":0,"serial_number":262,"kind":1}
{"type":"network-connection-detected","timestamp":1665559251,"local_address":"10.90.205.249:51628","remote_address":"14.205.45.111:443","interface_index":13,"pid":-2,"recv_buffer_size":131072,"recv_buffer_used":0,"serial_number":264,"kind":1}
{"type":"network-connection-update","timestamp":1665559251,"rx_bytes":0,"rx_packets":0,"tx_bytes":0,"tx_packets":0,"connection_serial":264}
{"type":"network-connection-detected","timestamp":1665559251,"local_address":"10.90.205.249:51628","remote_address":"14.205.45.111:443","interface_index":13,"pid":-2,"recv_buffer_size":131072,"recv_buffer_used":0,"serial_number":264,"kind":1}
{"type":"network-connection-update","timestamp":1665559252,"rx_bytes":0,"rx_packets":0,"tx_bytes":0,"tx_packets":0,"connection_serial":265}
{"type":"network-connection-update","timestamp":1665559252,"rx_bytes":0,"rx_packets":0,"tx_bytes":0,"tx_packets":0,"connection_serial":266}

GPU

{"type":"gpu","timestamp":1665559137,"tiler_utilization":20,"device_utilization":20,"renderer_utilization":20}

FPS

{"type":"fps","timestamp":1665559176,"fps":59}
{"type":"fps","timestamp":1665559177,"fps":51}

debugtalk avatar Oct 03 '22 14:10 debugtalk