Guides and Sample Code

Developer

Instruments User Guide

On This Page

Location Energy Model Instrument

Overview

Instrument Description

Tracks the energy impact of requests made to Core Location.

Supported Platforms

iOS

OS X

Related Profiling Templates

N/A, but can be opened via the Xcode Energy debug gauge or manually added to a template from the Instruments Library palette.

Timeline Pane

The timeline pane displays a graph showing when your app is actively using Core Location. The colors displayed in the graph provide an approximation of the ongoing energy impact of these requests. For example, low energy requests appear green, while high energy requests appear orange.

Record Settings

This instrument doesn’t have any record settings you can configure.

Display Settings

Click the Display Settings button (image: ../Art/instruments_displaysettings_button_inline_2x.png) in the inspector pane to customize the following display settings.

Track Display Settings

These settings control how information is displayed in the timeline pane.

Setting

Description

Options

Style

How information is presented. This is a fixed setting, which can’t be changed.

  • Energy Impact. Colored bars represent the energy impact and duration of requests to Core Location.

Detail Pane Columns

Trace Detail Type

The following trace columns are available in the detail pane.

Column name

Definition

Time

The position, in the timeline pane, when the location event occurred.

CLLocationManager

The address of the location manager object through which the request was made.

Event

The location event that occurred, such as a change in accuracy level, or the creation or release of a location manager object. A higher accuracy level generally uses more energy.

Thread

The thread on which the location event occurred.

Energy Impact Detail Type

The following energy impact columns are available in the detail pane.

Column name

Definition

Time

The position, in the timeline pane, when the location event occurred.

Duration

The duration of the location event. Longer requests use more energy.

Energy Impact

The energy impact of the location event. Values include None, Low, and High.

Cause

The cause of the location event, such as the Core Location manager changed the accuracy level.