简体   繁体   English

如何读取仪器泄漏图?

[英]How to read Instruments Leaks graph?

I understand the Leaks tool takes a snapshot every X (default 10) seconds. 我了解“泄漏”工具每X(默认为10)秒拍摄一次快照。 But do the red bars in the Leaks graph tell me the amount of leaked memory at that snapshot in time? 但是,“泄漏”图中的红色条是否能及时告诉我该快照的内存泄漏量? Or do they signify the cumulative memory leaked? 还是表示累积内存泄漏?

In other words, towards the end of this graph, has my app leaked the cumulative of all red bars in memory, or has it leaked no memory because the bar has diminished in size, and then didn't appear at all in the last snapshot interval? 换句话说,在该图的末尾,我的应用程序泄漏了内存中所有红色条形的累积量,还是因为泄漏条形的大小减小了它没有泄漏任何内存,然后在上一个快照中根本没有出现间隔?

在此处输入图片说明

You can check for yourself by clicking on the timeline and dragging over the time where the red bar is. 您可以通过单击时间轴并拖动红色条所在的时间来检查自己。 A tooltip will open that tells you the number of leaks and the amount of leaked memory. 将打开一个工具提示,告诉您泄漏的数量和内存的泄漏量。

You'll find Instruments shows the cumulative total of leaks and leaked memory in the tooltip. 您会发现工具在工具提示中显示了泄漏和内存泄漏的累积总数。 In your screenshot, if you drag over the small red bar, the tooltip will report a higher number of leaks and leaked memory than it reports for the two taller bars in the graph. 在屏幕快照中,如果将鼠标悬停在红色的小条上,则工具提示将报告比图表中两个较高的条更高的泄漏和内存泄漏数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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