Launch Instruments
Launch Instruments
該儀器應用在Xcode應用程序,所以推出是在Xcode的最直接的方式。你也可以啟動它間接地通過碼頭,啟動,或命令行。The Instruments app lives inside the Xcode app, so the most direct way to launch it is from within Xcode. You can also launch it indirectly via the Dock, Launchpad, or the command line.
從Xcode啟動儀器Launch Instruments from Xcode
啟動儀器的最直接的方式是通過在Xcode Xcode菜單。The most direct way to launch Instruments is via the Xcode menu in Xcode.
從Xcode菜單啟動儀器To launch Instruments from the Xcode menuOpen Xcode.
Choose Xcode > Open Developer Tool > Instruments.
TIP
您可以使用此方法啟動許多其他有用的開發工具。You can use this method to launch a number of other useful development tools.
你也可以啟動儀器以剖面的程序你都積極致力于在Xcode。You can also initiate Instruments in order to profile an app you are actively working on in Xcode.
打開Xcode項目簡介To profile an opened Xcode project啟動Xcode打開你的項目。Launch Xcode and open your project.
Do one of the following:
-
Choose Product > Profile.
-
Click and hold the Run button in the Xcode toolbar and choose Profile.
-
Press Command-I.
Xcode創建你的項目,儀器的推出,并會提示你選擇一個仿形模板。Xcode builds your project, Instruments launches, and you’re prompted to select a profiling template.
如果你需要用相同的模板定期您的應用程序配置文件,你可以設置你的Xcode項目自動用它當你啟動分析。If you need to profile your app with the same template regularly, you can set up your Xcode project to automatically use it whenever you initiate profiling.
建立一個Xcode項目使用特定的儀器分析模板To set up an Xcode project to use a specific Instruments profiling template啟動Xcode打開你的項目。Launch Xcode and open your project.
Choose Product > Scheme > Edit Scheme.
或者,在Xcode工具欄的格式彈出菜單,選擇“編輯方案。Or, from the Scheme pop-up menu in the Xcode toolbar, choose Edit Scheme.
Or, press Command–Less Than (<).
The scheme editor dialog appears.
Click Profile in the sidebar of the scheme editor dialog.
在“信息”下,單擊“工具彈出”菜單并選擇所需的分析模板。Under Info, click the Instrument pop-up menu and choose the desired profiling template.
如果你chooseask發射,儀器顯示其仿形模板選擇對話框,在啟動時。If you chooseAsk on Launch, Instruments displays its profiling template selection dialog when it starts up.
Click Close.
啟動分析。請打開Xcode項目簡介。Initiate profiling. See?To profile an opened Xcode project.
Xcode創建你的項目,儀器的推出,并開始分析您的應用程序與你的模板配置方案編輯。Xcode builds your project, Instruments launches, and it begins profiling your app with the template you configured in the scheme editor.
從碼頭發射儀器Launch Instruments from the Dock
儀器可在碼頭的Xcode圖標啟動。Instruments can be launched from the Xcode icon in the Dock.
從碼頭的Xcode圖標啟動儀器To launch Instruments from the Xcode icon in the DockOpen Xcode.
Control-click the Xcode icon in the Dock, and then choose Options > Open Developer Tool > Instruments from the shortcut menu.
The Instruments app launches.
You can also add Instruments to your Dock for quick access. The quickest way to do this is to launch Instruments and then set it to stay in the Dock.
永久地添加儀器到您的碼頭To permanently add Instruments to your DockOpen Xcode.
Choose Xcode > Open Developer Tool > Instruments.
Instruments launches and its icon appears in your Dock.
Control-click the Instruments icon in the Dock, and then choose Options > Keep in Dock from the shortcut menu.
Launch Instruments from Launchpad
啟動自動顯示駐留在您的應用程序文件夾的應用程序。由于儀器不在應用程序文件夾(至少不是直接在Xcode,它是在應用程序文件夾),它沒有出現在Launchpad。但是,您可以通過為工具創建一個別名并將其放入應用程序文件夾中來添加它。Launchpad automatically displays apps that reside in your Applications folder. Because Instruments isn’t in the Applications folder (at least, not directly—it’s in Xcode, which is in the Applications folder), it doesn’t appear in Launchpad. However, you can add it by creating an alias to Instruments and putting it in your Applications folder.
To add Instruments to LaunchpadOpen Xcode.
Choose Xcode > Open Developer Tool > Instruments.
Instruments launches and its icon appears in your Dock.
Control-click the Instruments icon in the Dock, and then choose Options > Show in Finder from the shortcut menu.
Option-Command-drag the Instruments app icon in the Finder to your Applications folder.
An alias of Instruments is created and added to your Applications folder.
Remove the?alias?suffix from the filename of the Instruments alias.
Instruments now appears in Launchpad.
Launch Instruments from the Command Line
You can use the?open?command to launch any app in OS?X via Terminal.
To launch Instruments using the open command line toolLaunch Terminal (in?/Applications/Utilities/).
Run the following command:
open /Applications/Xcode.app/Contents/Applications/Instruments.app
The Instruments app launches.
NOTE
您還可以使用兩個命令行實用工具來對應用程序進行概要分析,而不必實際顯示儀器用戶界面。You can also use either of two command-line utilities to profile an app without actually displaying the Instruments user interface.
-
工具實用程序使用指定的模板描述應用程序。結果可以保存到一個文件中,然后在主儀表應用程序中手動打開以便查看和分析。有關使用信息,請參見帶有儀器和儀表的配置文件(1)Mac開發人員工具手冊頁。instruments—This utility profiles an app using a specified template. The results can be saved to a file and then manually opened in the main Instruments app for viewing and analysis. For usage information, see?Profile with instruments?and?instruments(1) Mac OS X Developer Tools Manual Page.
-
iprofiler這個工具監視應用程序使用活動監視器、撥款、計數器、事件探查器、泄漏,系統跟蹤,和/或時間剖面。結果被保存到一個文件。地面可以打開儀器在觀察和分析以后。使用信息收集和iprofiler看到iprofilerand數據視圖(1)Mac OS X開發者工具手冊頁。iprofiler—This tool monitors an app using Activity Monitor, Allocations, Counters, Event Profiler, Leaks, System Trace, and/or Time Profiler. The results are saved into a?.dtps?file that can be opened in Instruments at a later time for viewing and analysis. For usage information, see?Collect and view data with iprofilerand?iprofiler(1) Mac OS X Developer Tools Manual Page.
轉載于:https://www.cnblogs.com/zyingn/p/Instruments_Launch.html
總結
以上是生活随笔為你收集整理的Launch Instruments的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: typescript 学习
- 下一篇: WSFC真实场景仲裁处理