Instruments provides you with numerous ways to collect and examine information about your app. Instruments consists of two main windows — the template selection window and the trace document window. The template selection window appears when Instruments is first started and allows you to select a trace template (a group of preconfigured instruments) based on their function, as well as an app to profile. After you select a template, the trace document window containing the template’s instruments and their configurations is displayed. You can add more instruments to the trace window, adjust instrument settings, collect data, examine collected data, and much more. This chapter describes these two primary windows and provides a quick walkthrough for each one.
Your First View: The Trace Template Selection Window
When Instruments opens, you are presented with a list of preconfigured trace templates, as seen in Figure 2-1. It includes a set of standard templates based on commonly performed tasks, as well as any custom templates you may have created. You can also bring up the template selection window by choosing File > New when running Instruments.
The trace template chooser dialog consists of these primary areas:
A target chooser, for selecting the device and process(es) to profile.
A filter for selecting sets of standard, custom, or recently used templates.
A search field, for searching the titles and descriptions of templates.
The (possibly filtered) list of trace templates.
A short description of the selected trace template. Use this to determine if the chosen template is the correct template for your needs.
Use a trace template as a starting point to collect data for a particular purpose. After choosing the template to load, click Choose to open the trace document and populate the document with the template’s instruments. You can then add or remove individual instruments from the trace document.
Collecting and Analyzing Data: The Trace Document Window
A trace document is a self-contained space for collecting and analyzing trace data. You use the document to organize and configure the instruments needed to collect data, and you use the document to view the data you’ve gathered, at both a high and low level.
Figure 2-2 shows a typical trace document after data collection is complete. Because a trace document window presents a lot of information, it has to be well organized. As you work with trace documents, information generally flows from left to right. The farther right you are in the document window, the more detailed the information becomes.
About the Instruments Trace Document in Instruments Help Articles lists the key elements that are called out in the figure above, as well as their components, and provides a more in-depth discussion of how you use these features.