版本記錄
| 版本號 | 時間 |
|---|---|
| V1.0 | 2018.06.19 |
前言
我們在做app的時候,不是做完功能就結(jié)束了,很多時候是需要進行檢查和優(yōu)化的,而xcode自帶了一個很好的檢查工具,可以檢測內(nèi)存泄漏。還可以查看哪一個方法比較耗時。還可以檢測離屏渲染等等,隨后的幾篇我們就說一下這個工具的使用。感興趣的可以看這幾篇。
1.INSTRUMENTS調(diào)試工具的使用(一)
2.INSTRUMENTS調(diào)試工具的使用(二)
3.INSTRUMENTS調(diào)試工具的使用(三)
4.INSTRUMENTS調(diào)試工具的使用(四)
5.INSTRUMENTS調(diào)試工具的使用(五)
6.INSTRUMENTS調(diào)試工具的使用(六)
7.INSTRUMENTS調(diào)試工具的使用(七)
8.INSTRUMENTS調(diào)試工具的使用(八)
9.INSTRUMENTS調(diào)試工具的使用(九)
10. INSTRUMENTS調(diào)試工具的使用(十)
11. INSTRUMENTS調(diào)試工具的使用(十一) —— 簡介(一)
12. INSTRUMENTS調(diào)試工具的使用(十二) —— 通常任務(wù)之啟動Instruments(一)
13. INSTRUMENTS調(diào)試工具的使用(十三) —— 通常任務(wù)之簡單了解Instruments(二)
14. INSTRUMENTS調(diào)試工具的使用(十四) —— 通常任務(wù)之創(chuàng)建、保存和打開跟蹤文檔(三)
15. INSTRUMENTS調(diào)試工具的使用(十五) —— 通常任務(wù)之指定目標應(yīng)用和設(shè)備(四)
16. INSTRUMENTS調(diào)試工具的使用(十六) —— 通常任務(wù)之訪問和使用個別儀器(五)
17. INSTRUMENTS調(diào)試工具的使用(十七) —— 通常任務(wù)之記錄、暫停和停止跟蹤(六)
18. INSTRUMENTS調(diào)試工具的使用(十八) —— 導(dǎo)航收集的數(shù)據(jù)之關(guān)于數(shù)據(jù)分析(一)
19. INSTRUMENTS調(diào)試工具的使用(十九) —— 導(dǎo)航收集的數(shù)據(jù)之導(dǎo)航時間軸窗格(二)
20. INSTRUMENTS調(diào)試工具的使用(二十) —— 導(dǎo)航收集的數(shù)據(jù)之導(dǎo)航詳細面板(三)
21. INSTRUMENTS調(diào)試工具的使用(二十一) —— 導(dǎo)航收集的數(shù)據(jù)之將數(shù)據(jù)映射到源代碼(四)
22. INSTRUMENTS調(diào)試工具的使用(二十二) —— 導(dǎo)航收集的數(shù)據(jù)之查看您應(yīng)用的源代碼(五)
23. INSTRUMENTS調(diào)試工具的使用(二十三) —— 分析你App的性能之測量CPU使用情況(一)
24. INSTRUMENTS調(diào)試工具的使用(二十四) —— 分析你App的性能之測量圖形性能(二)
25. INSTRUMENTS調(diào)試工具的使用(二十五) —— 分析你App的性能之監(jiān)視網(wǎng)絡(luò)和文件I / O(三)
26. INSTRUMENTS調(diào)試工具的使用(二十六) —— 分析你App的內(nèi)存使用之關(guān)于內(nèi)存分析(一)
27. INSTRUMENTS調(diào)試工具的使用(二十七) —— 分析你App的內(nèi)存使用之檢測內(nèi)存使用(二)
28. INSTRUMENTS調(diào)試工具的使用(二十八) —— 分析你App的內(nèi)存使用之找到廢棄的內(nèi)存(三)
29. INSTRUMENTS調(diào)試工具的使用(二十九) —— 分析你App的內(nèi)存使用之找到內(nèi)存泄露(四)
30. INSTRUMENTS調(diào)試工具的使用(三十) —— 分析你App的內(nèi)存使用之找到僵尸對象(五)
31. INSTRUMENTS調(diào)試工具的使用(三十一) —— 分析你App的能源之測量能源影響(一)
32. INSTRUMENTS調(diào)試工具的使用(三十二) —— 高級任務(wù)之導(dǎo)出和導(dǎo)入跟蹤數(shù)據(jù)(一)
33. INSTRUMENTS調(diào)試工具的使用(三十三) —— 高級任務(wù)之創(chuàng)建自定義Instruments(二)
34. INSTRUMENTS調(diào)試工具的使用(三十四) —— 分析模板和工具之分析模板(一)
35. INSTRUMENTS調(diào)試工具的使用(三十五) —— 分析模板和工具之Activity Monitor工具(二)
36. INSTRUMENTS調(diào)試工具的使用(三十六) —— 分析模板和工具之Allocations工具(三)
37. INSTRUMENTS調(diào)試工具的使用(三十七) —— 分析模板和工具之藍牙開關(guān)日志工具(四)
38. INSTRUMENTS調(diào)試工具的使用(三十八) —— 分析模板和工具之Carbon Events工具(五)
39. INSTRUMENTS調(diào)試工具的使用(三十九) —— 分析模板和工具之Cocoa Events工具(六)
40. INSTRUMENTS調(diào)試工具的使用(四十) —— 分析模板和工具之Connections工具(七)
41. INSTRUMENTS調(diào)試工具的使用(四十一) —— 分析模板和工具之Core Animation工具(八)
42. INSTRUMENTS調(diào)試工具的使用(四十二) —— 分析模板和工具之Core Data Cache Misses工具(九)
43. INSTRUMENTS調(diào)試工具的使用(四十三) —— 分析模板和工具之Core Data Faults工具(十)
44. INSTRUMENTS調(diào)試工具的使用(四十四) —— 分析模板和工具之Core Data Fetches工具(十一)
45. INSTRUMENTS調(diào)試工具的使用(四十五) —— 分析模板和工具之Core Data Saves工具(十二)
Overview
| Instrument Description | Supported Platforms | Related Profiling Templates |
|---|---|---|
Counters工具記錄來自用戶管理的PM事件的信息。 它可以記錄單個進程或系統(tǒng)上運行的所有進程的信息。 |
OS X |
Counters Profiling Template |
Timeline Pane - 時間線窗格
時間軸窗格根據(jù)選擇的PM事件顯示以下信息
Record Settings - 記錄設(shè)置
單擊檢查器窗格中的錄制設(shè)置按鈕以自定義以下錄制選項。
1. Instrument Configuration - 工具配置
這些設(shè)置控制儀器的工作方式
| Setting | State |
|---|---|
Sample By |
Specifies whether to sample by time or events. The default is time |
Event |
The event to sample. This option is only available when Sample By is set to sample events |
Sample Rate |
How often the instrument collects data. Choose microseconds (μs), milliseconds (ms), or seconds (s) |
Callstacks |
Select to view None, User, Kernel, or Both |
Events and Formulas |
Click the Add button (+) to add visible PM events and formulas. The number of events and formulas that can be recorded is hardware dependent. Trying to record too many events and formulas at once will result in an error message |
Display Settings - 顯示設(shè)置
單擊檢查器窗格中的顯示設(shè)置按鈕以自定義以下顯示設(shè)置。
1. Track Display Settings - 跟蹤顯示設(shè)置
這些設(shè)置控制信息在時間線窗格中的顯示方式。
| Setting | Description | Options |
|---|---|---|
Style |
How information is presented |
Counters: Shows any counters that have been selected |
Type |
How multiple parameters in one track are displayed. This is a fixed setting, which can’t be changed |
Stacked: Each statistic has its own graph |
2. Statistics to Graph - 統(tǒng)計到圖表
選擇一個統(tǒng)計數(shù)據(jù)以在時間線窗格中查看它。 單擊形狀或顏色以更改統(tǒng)計數(shù)據(jù)的表示方式。
3. Call Tree - 調(diào)用樹
以下調(diào)用樹顯示設(shè)置將在詳細信息窗格中篩選調(diào)用樹。
| Setting | State |
|---|---|
Separate by Thread |
Off by default |
Invert Call Tree |
Off by default |
Hide System Libraries |
Off by default |
Flatten Recursion |
Off by default |
Top Functions |
Off by default |
4. Call Tree Constraints - 調(diào)用樹限制
根據(jù)以下設(shè)置,以下選項可過濾調(diào)用樹以顯示屬于特定閾值的調(diào)用。
| Setting | State |
|---|---|
Count |
Off by default |
Time (ms) |
Off by default |
5. Data Mining - 數(shù)據(jù)挖掘
允許您通過收集的數(shù)據(jù)篩選特定的符號和庫
Detail Pane Columns - 詳細面板列
1. Call Tree Detail Type - 調(diào)用樹詳細類型
以下調(diào)用樹列在詳細信息窗格中可用
| Column name | Definition |
|---|---|
Total Samples |
The number of samples collected for the symbol and its children |
Total Time |
The total amount of time the symbol ran |
Running Time |
The amount of time the symbol ran, and the percentage of the running time of all symbols |
Samples |
The number of samples collected for the symbol and its children, and the percentage of all symbols |
Self (ms) |
The amount of time spent in the function, in milliseconds. If the Top Functions option is disabled under the display settings, this value excludes time spent in other functions it calls |
# Self |
The number of times the symbol has been called |
% Calls |
The percentage of total calls involving the symbol name |
# Calls |
The number of calls involving the symbol name |
% of Parent |
The percentage of bytes used by the call’s parent |
Source Path |
The path to the source file that generated the call |
Category |
An icon representing the category of the call |
Library |
The name of the library that generated the call |
Symbol Name |
The name of the symbol being called |
2. Sample List Detail Type - 采樣列表詳細類型
以下采樣列表列在詳細信息窗格中可用。
| Column name | Definition |
|---|---|
# |
The sequence number of the sample |
Timestamp |
The time that the sampling began |
Depth |
The depth of the stack trace |
Duration |
The duration of the sample |
CPU |
The processor on which the thread is running |
Process |
The process being sampled |
Thread |
The thread identifier |
Thread ID |
The ID of the thread on which the sample occurred |
Hot Frame |
The function encountered most frequently during the sample |
Hot Frame Address |
The memory address of the function encountered most frequently during the sample |
Responsible Library |
The library responsible for the process |
Responsible Caller |
The function that created the process |
后記
本篇主要講述了
Counters工具,感興趣的給個贊或者關(guān)注~~~~
