Android Programming: The Big Nerd Ranch Guide, 5th Edition
by Bryan Sills, Brian Gardner, Kristin Marsicano, Chris Stewart
Challenge: Exploring the Profiler
The profiler tool window creates detailed reports for how your application is using an Android device’s resources, such as CPU and memory. It is useful when assessing and tuning the performance of your app.
To view the profiler tool window, run your app on a connected Android device or emulator and select View → Tool Windows → Profiler from the menu bar. Once the profiler is open, you can see a timeline with sections for CPU, memory, network, and energy.
Click into a section to see more details about your app’s usage of that resource. On the CPU view, make sure to hit the Record button to capture more information about CPU usage. After you have performed any interactions with your app that you would ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access