[转]Xcode中TimeProfile的使用

一、对Xcode进行设置

如果想要在TimeProfile中直观的查看方法耗时,需要对Xcode进行设置

在Xcode->Build Setting->Debug Information Format中设置选项为:DWARF with DSYM File


Xcode中TimeProfile使用-1.png

注意:不为该选项的话,在TimeProfile中就只能看到一堆线程

二、对TimeProfile进行设置

1、在TimeProfile的Call Tree中,右侧面板有三个检查器:record setting(记录设置)、display setting(展示设置)、还有extends detail(扩展详情)

2、我们选择display setting,并在该选择器中勾选Separate by Thread和Hide System Libraries(两个最基本的选项)


Xcode中TimeProfile使用-2.png

3、这样就可以逐级查看每个方法的耗时了


Xcode中TimeProfile使用-3.png


作者:YunsChou
链接:http://www.jianshu.com/p/8e682044e254
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
原文地址:https://www.cnblogs.com/linganxiong/p/7230135.html