How to: Profile in the Background Without Overlays
I’ve always suspected that it’s better to profile a mobile device in the background with no visible graphs or on-screen overlays. After profiling, the data collected can be viewed or saved -- so it can be analyzed later. I was recently able to test this theory using a Monsoon Power Monitor. Here is what I found when running Trepn’s 'CPU Frequency Overlay' preset on a Samsung Galaxy Note 3
· Onscreen overlays ON: 1384 mW average power
· Onscreen overlays OFF: 625 mW average power
In both of the above tests the home screen was visible at all times. When performing the same test with the screen and overlays turned off, the average power consumed was only 41 mW, yet the same amount of processor data was collected. However this scenario only works for tests where the user doesn’t have to interact with the screen.
Settings for my test: Airplane mode: On; Screen brightness: 50%; Display Screen Mode: Standard. Trepn General Settings: Acquire Wakelock while Profiling: Checked. Stock Samsung Galaxy Note 3 home screen wallpaper. Profile duration: 140 seconds.
Trepn Profiler’s onscreen overlays can be extremely useful because they allow you to see the impact of your actions in real-time, but they also consume a lot of screen real estate and sometimes get in the way. By turning them off, you can reduce the power consumption by almost half. There are several different ways that you can profile without anything on the screen. Here is the first of 3 options:
1. Launch Trepn Profiler and select the 'Network Activity' preset. This is done to automatically turn off all of the overlays.
2. Touch the left arrow near the top of the screen to return to the Trepn Profiler home screen.
3. Touch the beaker icon and the Settings button
4. Select the DATA POINTS tab and uncheck every data point. Then check the following four data points: CPU1 Frequency, CPU2 Frequency CPU3 Frequency and CPU4 Frequency.
5. Next, touch the Back button once
6. When you are ready to profile, touch the ‘Profile System’ button.
7. Finally, touch the Home button to return to the Android Home screen.
When profiling using the above method, Trepn Profiler will record whatever data points you have selected in the background. After you have finished profiling, swipe down on the Notification bar and touch ‘STOP PROFILING’ under ‘Trepn.’ It’s a good idea to save your data as .db so it can be analyzed later. Be patient. It can take 5-10 minutes when saving a long profiling session.
Start profiling in Trepn and they return to the home screen while the Trepn app runs in the background. When you are fininished, open Trepn again and view or save the data.
Connect a USB cable to your device and use ADB commands to start and stop Trepn. Refer to Section 3.2.1 of the Trepn User Guide for more info about this. This method has the least amount of overhead, but requires a PC and ADB scripts. It's also only good for processor profiling, because it will affect your power readings.