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: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access