Instruments (software)

{{Missing information|usage of Instruments app for profiling an app's performance on an iOS device|date=June 2020}}

{{Use mdy dates|date=June 2020}}

__FORCETOC__

{{Infobox software

| name = Instruments

| logo = Image:Apple Instruments Icon.png

| logo alt = Instruments application icon

| screenshot =

| caption =

| developer = Apple Inc

| latest_release_version = 15.0 (Same as the Xcode version it is bundled with.)

| latest_release_date = September 18, 2023

| operating_system = macOS

| genre = Tracing & Profiling

| license = Proprietary freeware

| website = [https://help.apple.com/instruments/mac/current/# help.apple.com/instruments]

}}

Instruments (formerly Xray) is an application performance analyzer and visualizer by Apple Inc., integrated in Xcode 3.0 and later versions of Xcode. It is built on top of the DTrace tracing framework from OpenSolaris, which was ported to Mac OS X v10.5 and which is available in all following versions of macOS.

Instruments shows a time line displaying any event occurring in the application, such as CPU activity variation, memory allocation, and network and file activity, together with graphs and statistics. Group of events are monitored via customizable "instruments", which have the ability to record user generated events and replay (emulate) them exactly as many times as needed, so a developer can see the effect of code changes without actually doing the repetitive work. The Instrument Builder feature allows the creation of custom analysis instruments.{{Cite web|url=https://help.apple.com/instruments/mac/current/#/dev2b9e575d|archive-url=https://web.archive.org/web/20200620073428/https://help.apple.com/instruments/mac/current/#/dev2b9e575d|url-status=dead|archive-date=2020-06-20|title= Add an instrument to a trace document - Instruments Help}}

== Features ==

Built-in instruments can track

  • CPU activity of processes and threads.{{Cite web|url=https://help.apple.com/instruments/mac/current/#/dev44b2b437|archive-url=https://web.archive.org/web/20200620073428/https://help.apple.com/instruments/mac/current/#/dev44b2b437|url-status=dead|archive-date=2020-06-20|title= Track CPU core and thread use- Instruments Help}}
  • Memory allocation and release,{{Cite web|url=https://help.apple.com/instruments/mac/current/#/dev7b8f6eb6|archive-url=https://web.archive.org/web/20200620073428/https://help.apple.com/instruments/mac/current/#/dev7b8f6eb6|url-status=dead|archive-date=2020-06-20|title= Find abandoned memory - Instruments Help}} garbage collection and memory leaks.{{Cite web|url=https://help.apple.com/instruments/mac/current/#/dev022f987b|archive-url=https://web.archive.org/web/20200620073428/https://help.apple.com/instruments/mac/current/#/dev022f987b|url-status=dead|archive-date=2020-06-20|title= Find memory leaks - Instruments Help}}
  • File reads, writes, locks.{{Cite web|url=https://help.apple.com/instruments/mac/current/#/dev6983c7c4|archive-url=https://web.archive.org/web/20200620073428/https://help.apple.com/instruments/mac/current/#/dev6983c7c4|url-status=dead|archive-date=2020-06-20|title= Monitor disk use - Instruments Help}}
  • Network activity and traffic.{{Cite web|url=https://help.apple.com/instruments/mac/current/#/devc63117d3|archive-url=https://web.archive.org/web/20200620073428/https://help.apple.com/instruments/mac/current/#/devc63117d3|url-status=dead|archive-date=2020-06-20|title= Use Activity Monitor to track overall network and disk use - Instruments Help}} This instrument works like Activity Monitor but also stores the data for future reference.
  • Graphics and inner workings of OpenGL{{Cite web|url=https://developer.apple.com/documentation/metal/optimizing_performance_with_the_gpu_counters_instrument|archive-url=https://web.archive.org/web/20200620075221/https://developer.apple.com/documentation/metal/optimizing_performance_with_the_gpu_counters_instrument|url-status=dead|archive-date=2020-06-20|title= Optimizing Performance with the GPU Counters Instrument - Apple Developer Documentation}} and Metal.{{Cite web|url=https://developer.apple.com/documentation/metal/using_metal_system_trace_in_instruments_to_profile_your_app|archive-url=https://web.archive.org/web/20200620075030/https://developer.apple.com/documentation/metal/using_metal_system_trace_in_instruments_to_profile_your_app|url-status=dead|archive-date=2020-06-20|title= Using Metal System Trace in Instruments to Profile Your App - Apple Developer Documentation}}
  • Energy diagnostics and "dead" objects.{{Cite web|url=https://help.apple.com/instruments/mac/current/#/deva0db8947|archive-url=https://web.archive.org/web/20200620073428/https://help.apple.com/instruments/mac/current/#/deva0db8947|url-status=dead|archive-date=2020-06-20|title= Measure the energy impact of an iOS device - Instruments Help}}
  • UI automation and Core animation.
  • User events, such as keyboard keys pressed and mouse moves and clicks with exact time.

See also

References