Instruments

Instruments is a powerful and flexible performance-analysis and testing tool that’s part of the Xcode tool set. It’s designed to help you profile your macOS and iOS apps, processes, and devices in order to better understand and optimize their behavior and performance. Incorporating Instruments into your workflow from the beginning of the app development process can save you time later by helping you find issues early in the development cycle.

In Instruments, you use specialized tools, known as instruments, to trace different aspects of your apps, processes, and devices over time. Instruments collects data as it profiles, and presents the results to you in detail for analysis.

Unlike other performance and debugging tools, Instruments allows you to gather widely disparate types of data and view them side by side. This makes it easier to identify trends that might otherwise be overlooked. For example, your app may exhibit large memory growth caused by multiple open network connections. By using the Allocations and Connections instruments together, you can identify connections that are not closing and thus resulting in rapid memory growth.

By using Instruments effectively, you can:

Although it’s embedded within and may be used with Xcode, Instruments is a separate app, which may be used independently as needed.

For detailed information about Instruments, see Instruments Help.