Instruments (application)

Instruments (previously Xray ) is an application for measuring the performance of an application to the analysis of bottlenecks, which is supplied by Apple as part of the Xcode Tools. The first version of the instrument was published in autumn 2007, together with Xcode 3.0 and Mac OS X 10.5. With Xcode 3.1, a new version of the instrument that could measure the performance of iPhone applications appeared. Instruments based on the DTrace technology from OpenSolaris from Sun that has been ported to Mac OS X.

Functions

With Instruments, a developer, among others, measure and record the following:

  • CPU activity of processes and individual threads
  • Memory usage, memory leaks
  • File and network access
  • Graphic performance (for OpenGL)
  • User input ( keyboard, mouse)

The individual measuring functions are called instruments ( hence the name) divided. The developer can insert the necessary for its measurement instruments in its measurement window and configure there too. Developers can also create your own instruments with the integrated instrument builder.

If a recording is started, the instrument loads and starts the desired binary file or attaches itself to an already existing process, and measures the desired values. These are displayed on a timeline as a graph; optionally, the values ​​measured before and only then drawn ( " deferred mode ").

When the recording ends or the program is closed, the developer can move the mouse to a certain point in the timeline and the code that was running at that time, closer analysis (eg to isolate a memory leak ). The actions that can be repeated again and again, so that the developer does not multiply again and again, for example, press the same buttons must, but can analyze the behavior of its application. The measurements can also be stored; However, depending on the length of the recording and the instruments that file can be several gigabytes in size.

  • Programming tool
  • Apple program
413622
de