2. 80-N2762-2 A 2
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Contents
1 Introduction...................................................................................................... 4
1.1 Trepn™ Plug-in ............................................................................................................4
1.2 Conventions ..................................................................................................................4
1.3 Updates to this version..................................................................................................4
1.4 References.....................................................................................................................5
1.5 Technical assistance......................................................................................................5
2 Installing the Trepn Plug-in ............................................................................ 6
2.1 Requirements ................................................................................................................6
2.2 Installation steps ...........................................................................................................6
3 Using the Trepn Plug-in ................................................................................ 10
3.1 Trepn Control pane .....................................................................................................10
3.2 Starting and stopping a profile....................................................................................11
3.3 Manipulating and viewing chart information..............................................................13
3.4 Creating custom charts................................................................................................15
3.5 Collecting debug output with Trepn LogCat ..............................................................15
3.6 Updating the Trepn Plug-in ........................................................................................16
3.7 Uninstalling the Trepn Plug-in....................................................................................16
3. 80-N2762-2 A 3
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Revision history
Revision Date Description
A Sep 2013 Initial release
4. 80-N2762-2 A 4
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
1 Introduction1
1.1 Trepn™ Plug-in2
The Trepn Plug-in for Eclipse is a plug-in running on a Mac/PC computer in the Eclipse3
environment that allows developers to gain insight into how running their app affects power4
consumption. The Trepn Plug-in is designed for developers to analyze power consumption and5
optimize the power efficiency of their apps.6
The Trepn Plug-in works in conjuction with the Trepn Profiler, an Android app that is installed7
on your connected device when you run the Trepn Plug-in. See [Q1] for details on using the8
Trepn Profiler.9
For more information and to ask technical questions about the Trepn Plug-in and the10
Trepn Profiler app, see the forum at https://developer.qualcomm.com/forums/qdevnet-11
forums/trepn-plug-eclipse.12
1.2 Conventions13
Function declarations, function names, type declarations, and code samples appear in a different14
font, e.g., #include.15
Button and key names appear in bold font, e.g., click Save or press Enter.16
1.3 Updates to this version17
This is the initial beta release of the Trepn Plug-in.18
5. Introduction
80-N2762-2 A 5
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
1.4 References1
Reference documents are listed in Table 1-1. Reference documents that are no longer applicable2
are deleted from this table; therefore, reference numbers may not be sequential.3
Table 1-1 Reference documents and standards4
Ref. Document
Qualcomm Technologies
Q1 Trepn™ Profiler Starter Edition User Guide 80-N2762-1
Resources
R1 Android SDK for Android Developers http://developer.android.com/sdk/index.html
R2 Installing the Eclipse Plug-in http://developer.android.com/sdk/installing/
installing-adt.html
R3 Using Hardware Devices http://developer.android.com/tools/device.html
R4 Trepn Plug-in for Eclipse FAQ https://developer.qualcomm.com/mobile-
development/performance-tools/trepn-plugin-
eclipse/faq
R5 LogCat for Android Developers http://developer.android.com/tools/help/
logcat.html
R6 Trepn Plug-in for Eclipse Forum https://developer.qualcomm.com/forums/
qdevnet-forums/trepn-plug-eclipse
5
1.5 Technical assistance6
For assistance or clarification on information in this document, visit the Trepn Plug-in for Eclipse7
Forum at https://developer.qualcomm.com/forums/qdevnet-forums/trepn-plug-eclipse.8
9
6. 80-N2762-2 A 6
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
2 Installing the Trepn Plug-in1
2.1 Requirements2
n Mac or PC with:3
¨ Eclipse with ADT Plug-in – Install either the ADT Bundle [R1] or ADT Plug-in [R2]4
¨ ADB ver 1.0.31 or higher – Ensure ADB is in your system variables path and working;5
see [R3] or Internet forums6
n Android device – See [R4] for a list of supported devices7
2.2 Installation steps8
1. Launch Eclipse.9
2. Select Help → Install New Software.10
3. Click Add.11
4. Enter the following then click OK:12
¨ Name – You may use any name, e.g., Trepn Plug-in13
¨ Location – https://developer.qualcomm.com/docs/trepn/eclipse/14
7. Installing the Trepn Plug-in
80-N2762-2 A 7
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
1
2
5. Select the Trepn Plug-in checkbox and click Next.3
6. In Install Details, click Next.4
8. Installing the Trepn Plug-in
80-N2762-2 A 8
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
7. Review and accept the license agreement and click Finish:1
2
3
8. If you see a security warning regarding unsigned content, click OK.4
5
6
Installing dependencies may take a few minutes.7
9. After installation completes, restart Eclipse.8
10. Select Window → Open Perspective → Other.9
9. Installing the Trepn Plug-in
80-N2762-2 A 9
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
11. Select Trepn and click OK. Downloading additional files may take a few minutes.1
2
3
10. 80-N2762-2 A 10
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
3 Using the Trepn Plug-in1
3.1 Trepn Control pane2
Figure 3-1 shows the Trepn controls.3
}
Starts profiling
with Wakelocks
Starts profiling
without Wakelocks
Retrieves most recent
data file from device
Exports datafiles as
.trepn file
Stops profiling
Opens Trepn
data file
Eclipse toolbar has
no effect on Trepn
4
Figure 3-1 Trepn controls5
Exporting a .trepn file is the equivalent of creating a zip file containing the .db database file and6
the LogCat file, saved locally in the current workspace _trepn/logs/ folder.7
11. Using the Trepn Plug-in
80-N2762-2 A 11
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
3.2 Starting and stopping a profile1
To profile:2
1. Launch Eclipse.3
2. Connect your device to the computer via USB. Confirm that your device is listed.4
Device enumerates
but should not be
listed as Offline5
6
3. In the Trepn Control pane, click the green play icon to start profiling.7
Play icon
starts profile
8
9
12. Using the Trepn Plug-in
80-N2762-2 A 12
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
If not already installed, the Trepn Profiler Android app will be installed on your device and1
will begin profiling.2
Status changes
to indicate Trepn
Profiler is running
3
4
NOTE: On commercial devices Battery Power measurements, Wakelocks, and WifiLocks will not be5
accurate if the device is connected via USB. On Snapdragon™ Mobile Development Platform6
(MDP) devices, this is not an issue.7
4. If Battery Power measurements, Wakelocks, and WifiLocks are being profiled, disconnect8
the USB cable from your device.9
5. When done with the test run, reconnect your device via USB (if needed).10
6. In the Trepn Control pane, click the red stop icon to stop profiling, save, and display the data.11
Stop icon (stops
Trepn Profiler and
retrieves the session
data from device)
12
13
13. Using the Trepn Plug-in
80-N2762-2 A 13
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
3.3 Manipulating and viewing chart information1
When you do not have a profile session loaded, the checkboxes under Charts, which control2
showing and hiding the graph, are not clickable; i.e., without a profile session loaded, there is3
nothing to show or hide. You can load a log file in one of the following ways:4
n With your device connected, start and stop a profile as indicated above to create and load a5
new file (.db).6
n In the Trepn Control pane, click the Open icon and select a .db or .trepn file to open.7
In the Trepn Control pane, check the Charts that you wish to display. Grayed out checkboxes8
indicate data is not available, e.g., if you are not connected via Wi-Fi, these checkboxes are9
grayed out.10
Tips11
n Hover over the graph to display a tooltip with more details.12
n Zoom in by clicking and dragging a box around the desired portion of the graph from upper13
left to lower right.14
n Zoom out by clicking and dragging from the lower right to upper left.15
n Click on a point in the graph to move the LogCat to the message closest to this timestamp.16
17
Zoom in by dragging a box
from upper left to lower right
Zoom out by dragging from
lower right to upper left
Mobile Data Usage
grayed out because
not connected to
mobile network
Hover over
graph to display
tooltip with
details
Click on point in graph
to move LogCat to
message closest to this
timestamp
18
14. Using the Trepn Plug-in
80-N2762-2 A 14
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
For Mobile and Wi-Fi Data Usage, Trepn monitors any apps that are using data, as indicated by1
an arrow next these items. Click the arrow to show or hide checkboxes for these items.2
Arrow shows/hides
checkboxes for
apps using data
Checkboxes
show/hide items
3
4
NOTE: For Mobile and Wi-Fi Data Usage, the Y-axis of the graph uses a logarithmic scale, i.e., 1 byte,5
10 bytes, 100 bytes, 1 KB, ….6
15. Using the Trepn Plug-in
80-N2762-2 A 15
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
3.4 Creating custom charts1
You can create custom charts based on LogCat messages. This allows you to correlate the2
application state with profiling data. For example, to create a custom chart for application state3
transitions and events:4
1. In the Custom Charts group in the Trepn Control pane, click the edit (pencil) icon.5
2. In the Custom LogCat Charts window, click the green plus icon and enter a chart name and6
up to eight state names and associated LogCat regular expressions.7
8
9
3. Click OK.10
3.5 Collecting debug output with Trepn LogCat11
The Trepn LogCat displays the Android LogCat logging system for collecting and viewing12
system debug output. When viewing the graph, click on the point in the graph to move LogCat to13
the message closest to this timestamp. See [R5] for more information on the Android LogCat.14
16. Using the Trepn Plug-in
80-N2762-2 A 16
MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
3.6 Updating the Trepn Plug-in1
To update:2
1. Launch Eclipse.3
2. If the Trepn Perspective is open, close the Perspective.4
3. Select Help → Check for updates.5
4. In Available Updates, select the Trepn Plug-in for Eclipse checkbox and click Next.6
5. In Update Details, click Next.7
6. Review and accept the license agreement and click Finish.8
7. In Software Update, click Yes to restart Eclipse.9
3.7 Uninstalling the Trepn Plug-in10
To uninstall:11
1. Launch Eclipse.12
2. It is recommended that you close the Perspective before uninstalling. Select Window →13
Close Perspective.14
3. Select Help → About Eclipse.15
4. In About Eclipse, click Installation Details.16
17
18
5. Select Trepn Plug-in for Eclipse and click Uninstall.19
6. In Uninstall Details, click Finish.20
You can reinstall the Trepn Plug-in as described in Section 2.2.21
22