APP Performance Analysis

Source: Internet
Author: User

Key factors:----Instrument performance analysis artifact

1. Start-Up time

The application startup time is very important for the first experience of the user, while the system has strict requirements on the running time of the application startup and recovery, and the system shuts down the application directly when the application time-out. Here are a few common scenarios in which the system requires app uptime: * Launch 20 seconds Resume 10 seconds Suspend 10 seconds Quit 6 seconds background Task 10 minutes

The simplest way to get an accurate app startup time is to first add the following code to the MAIN.C:

123 
CFAbsoluteTime StartTime;int main(int argc, char **argv) { StartTime = CFAbsoluteTimeGetCurrent();

Then add in the callback method of the Appdelegate application:didFinishLaunchingWithOptions :

dispatch_async(dispatch_get_main_queue(), ^{    NSLog(@”Lauched in %f seconds.”,  (CFAbsoluteTimeGetCurrent() – StartTime)); });可能你会觉得为什么这样可拿到系统启动的时间,因为这个dispatch_async中提交的工作会在app主线程启动后的下一个run lopp中运行,此时app已经完成了载入并且将要显示第一帧画面,也就是系统会运行到`-[UIApplication _reportAppLaunchFinished]`之前。是用Instruments工具Time Profiler跑的调用栈,Instruments的使用方法建议看WWDC中与performance相关的[session录像](https://developer.apple.com/videos/wwdc),文字写起来太单薄不够直观哈。

2. User response

3. Memory

4. Graphic drawings

5. Documents

6. Network

APP Performance Analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.