【发布时间】:2017-10-09 07:24:15
【问题描述】:
我一直在寻找诸如以下 iOS 中的指标。但是还没有成功。作为这个 Unix 指标环境的新手,我非常感谢在这方面获得任何初学者或帮助。 谢谢。
1.system.io.util - The percent of time the CPU spent waiting for IO operations to complete.
2.system.cpu.iowait - The percent of CPU time during which I/O requests were issued to the device
在task_wait_state_info 的详细信息中,有一个可用的结构如下:
struct task_wait_state_info {
uint64_t total_wait_state_time; /* Time that all threads past and present have been in a wait state */
uint64_t total_wait_sfi_state_time; /* Time that threads have been in SFI wait (should be a subset of total wait state time */
uint32_t _reserved[4];
};
task_wait_state_info_data_t waittime;
NSLog(@"Wait time : %llu",waittime.total_wait_state_time);
这与1.system.io.util 中的等待时间相同吗?
【问题讨论】:
标签: ios objective-c swift cpu-usage