instrument ['ɪnstrʊm(ə)nt]n. 仪器;工具;乐器;手段;器械 -----先上翻译 英文不好。
Time Profiler:分析代码的执行时间,找出导致程序变慢的原因。
Allocations:监测内存使用/分配情况
迅速膨胀的内存可以很快让程序毙命,所以要多加防范。
Leaks:找到引发内存泄漏的起点
commmad+i 选择所需要的工具
1.Allocations [分配 配置]
用来监测内存的使用和分配情况
点击红点程序开始启动
![](https://img.haomeiwen.com/i301562/26b649b3d23a2cd4.png)
这个时候就开始监控内存情况了
transient & Total Bytes :瞬态和总字节数
persistent 持久的 transient 瞬间的 Total 总的
![](https://img.haomeiwen.com/i301562/bb94cd8697f7c62d.png)
heap堆
Anonymous VM(匿名虚拟内存)
![](https://img.haomeiwen.com/i301562/62ac5107c79f6512.png)
选择Call Trees 就可以看哪个方法 占用了多少内存了
![](https://img.haomeiwen.com/i301562/84489be43762813c.jpg)
[iOS 开发:用 Instruments 来检验你的app](http://segmentfault.com/a/1190000000387082)
..[iOS 性能优化:Instruments 工具的救命三招](http://segmentfault.com/a/1190000002568993)
网友评论