Chapter 17: Testing Code with Instruments
Debugging is ideal for low-level line-by-line fault finding. But it’s often useful to take a wider view of application performance—for example, to identify performance bottlenecks, monitor processor loading, and check for memory leaks.
The Xcode toolchain includes a powerful and comprehensive helper application called Instruments, used for general testing and profiling. Instruments is a general purpose timeline–based test rig that supports a selection of instruments—plug-in test probes that monitor some feature or performance metric.
You can combine multiple instruments to create a custom test rig, save the rig for use with other applications, and save the results of every test run for comparison with other runs. Instruments supports both iOS and OS X applications, but each OS supports a slightly different selection of instruments.
These are the key benefits of Instruments:
- A timeline: You can graph and compare the output of multiple instruments simultaneously and watch supporting charts and tables.
- Live testing: ...
Get Xcode 5 Developer Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.