简体   繁体   中英

Tracking app's CPU usage on iOS

everyone. I have asked many questions about real-time plotting by using Core-Plot. The problems I asked before were solved, now I have to profile my app's performance. I use the Instruments and Debug navigator in Xcode to track the CPU usage, but I don't really understand the details clearly.

在此处输入图片说明

In the pic above, I don't know why the Total Activity CPU usage percentage is higher than Foreground App Activity. Does Foreground App means the App I profile?

在此处输入图片说明

In another pic above, the CPU Usage Comparison pie chart shows that the total usage percentage is 200%? So my app's actual use percentage is 101/200 = 50.5%?

Besides, I want to ask that if I am using Core-Plot to do the real-time plotting(0.02s/point), the average CPU percentage used is about 100% most of time, is that normal?

I'm new to iOS development, big thanks for your patient and help!!!

The different columns are documented here . Basically, the Total activity is the average CPU usage during the given period, and the Foreground activity is the average CPU usage when your app was scheduled by the kernel.

100% CPU usage means that you are using one CPU core 100% (or, unlikely, two cores 50%). This means that your app is running at maximum speed on the hardware and you may benefit from parallelizing your code to run on multiple cores (which may also save battery, depending on hardware).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM