Instruments的使用
2015-05-25 本文已影响479人
石丘
instrument ['ɪnstrʊm(ə)nt]n. 仪器;工具;乐器;手段;器械 -----先上翻译 英文不好。
Time Profiler:分析代码的执行时间,找出导致程序变慢的原因。
Allocations:监测内存使用/分配情况
迅速膨胀的内存可以很快让程序毙命,所以要多加防范。
Leaks:找到引发内存泄漏的起点
commmad+i 选择所需要的工具
1.Allocations [分配 配置]
用来监测内存的使用和分配情况
点击红点程序开始启动

这个时候就开始监控内存情况了
transient & Total Bytes :瞬态和总字节数
persistent 持久的 transient 瞬间的 Total 总的

heap堆
Anonymous VM(匿名虚拟内存)

选择Call Trees 就可以看哪个方法 占用了多少内存了

[iOS 开发:用 Instruments 来检验你的app](http://segmentfault.com/a/1190000000387082)
..[iOS 性能优化:Instruments 工具的救命三招](http://segmentfault.com/a/1190000002568993)