Setting Background Profiling Preferences

Use the Background Profiling tab to configure how the Time Profiler instrument behaves when operating in the background. Since background time profiling is a low impact CPU sampler, you can activate it without Instruments running. To do this, enable the time profiling services in the Keyboard > Shortcuts > Services pane in System Preferences. You can even assign keyboard shortcuts to these services, as explained in Setting General Preferences. When Instruments is running, time profiling can be started from the Instruments Dock menu (Control+Click on the Instruments icon in the dock to display this menu)

Open Instruments > Preferences, and click Background Profiling.

../Art/instruments_prefs_backgroundprofiling_2x.png

You can configure the following options:

  • Sampling interval: Specifies how often a sample is taken. Type a numeric value in the field. Choose microsecond (μs), millisecond (ms), or second (sec) from the pop-up menu. Defaults to 1 millisecond.

  • Sampling duration: Sets the length of a sample trace. Type a numeric value in the field. Choose microsecond (μs), millisecond (ms), or second (sec) from the pop-up menu. Defaults to 5 seconds.

Definitive Discussion