From 881e7299042658ea6a5d2f1fb223fd7bef94e1c9 Mon Sep 17 00:00:00 2001 From: Aleks Haecky Date: Thu, 23 Apr 2015 13:17:19 -0700 Subject: docs: Add peformance tools getting started docs in new tools/performance subtree. Bug: 231376 Change-Id: I8126a0c71f3e87bbb2e3823aacbe0ab20c59d5a9 --- .../tools/performance/allocation-tracker/index.jd | 148 +++++++++ .../batterystats-battery-historian/charts.jd | 124 ++++++++ .../batterystats-battery-historian/index.jd | 129 ++++++++ docs/html/tools/performance/comparison.jd | 133 +++++++++ .../tools/performance/debug-gpu-overdraw/index.jd | 156 ++++++++++ docs/html/tools/performance/heap-viewer/index.jd | 177 +++++++++++ .../tools/performance/hierarchy-viewer/index.jd | 330 +++++++++++++++++++++ .../performance/hierarchy-viewer/profiling.jd | 169 +++++++++++ .../tools/performance/hierarchy-viewer/setup.jd | 89 ++++++ .../tools/performance/importing-legacy-apps.jd | 149 ++++++++++ docs/html/tools/performance/index.jd | 73 +++++ .../html/tools/performance/memory-monitor/index.jd | 172 +++++++++++ .../performance/profile-gpu-rendering/index.jd | 181 +++++++++++ docs/html/tools/performance/systrace/index.jd | 182 ++++++++++++ .../thumbnails/tools_allocation_tracker.png | Bin 0 -> 21286 bytes .../thumbnails/tools_battery_historian.png | Bin 0 -> 18614 bytes .../thumbnails/tools_debug_gpu_overdraw.png | Bin 0 -> 14698 bytes .../performance/thumbnails/tools_heap_viewer.png | Bin 0 -> 15931 bytes .../thumbnails/tools_hierarchy_viewer.png | Bin 0 -> 10727 bytes .../tools_hierarchy_viewer_profiling.png | Bin 0 -> 14409 bytes .../thumbnails/tools_memory_monitor.png | Bin 0 -> 4362 bytes .../thumbnails/tools_profile_gpu_rendering.png | Bin 0 -> 62818 bytes .../performance/thumbnails/tools_systrace.png | Bin 0 -> 13982 bytes .../performance/thumbnails/tools_traceview.png | Bin 0 -> 11385 bytes docs/html/tools/performance/traceview/index.jd | 292 ++++++++++++++++++ 25 files changed, 2504 insertions(+) create mode 100644 docs/html/tools/performance/allocation-tracker/index.jd create mode 100644 docs/html/tools/performance/batterystats-battery-historian/charts.jd create mode 100644 docs/html/tools/performance/batterystats-battery-historian/index.jd create mode 100644 docs/html/tools/performance/comparison.jd create mode 100644 docs/html/tools/performance/debug-gpu-overdraw/index.jd create mode 100644 docs/html/tools/performance/heap-viewer/index.jd create mode 100644 docs/html/tools/performance/hierarchy-viewer/index.jd create mode 100644 docs/html/tools/performance/hierarchy-viewer/profiling.jd create mode 100644 docs/html/tools/performance/hierarchy-viewer/setup.jd create mode 100644 docs/html/tools/performance/importing-legacy-apps.jd create mode 100644 docs/html/tools/performance/index.jd create mode 100644 docs/html/tools/performance/memory-monitor/index.jd create mode 100644 docs/html/tools/performance/profile-gpu-rendering/index.jd create mode 100644 docs/html/tools/performance/systrace/index.jd create mode 100644 docs/html/tools/performance/thumbnails/tools_allocation_tracker.png create mode 100644 docs/html/tools/performance/thumbnails/tools_battery_historian.png create mode 100644 docs/html/tools/performance/thumbnails/tools_debug_gpu_overdraw.png create mode 100644 docs/html/tools/performance/thumbnails/tools_heap_viewer.png create mode 100644 docs/html/tools/performance/thumbnails/tools_hierarchy_viewer.png create mode 100644 docs/html/tools/performance/thumbnails/tools_hierarchy_viewer_profiling.png create mode 100644 docs/html/tools/performance/thumbnails/tools_memory_monitor.png create mode 100644 docs/html/tools/performance/thumbnails/tools_profile_gpu_rendering.png create mode 100644 docs/html/tools/performance/thumbnails/tools_systrace.png create mode 100644 docs/html/tools/performance/thumbnails/tools_traceview.png create mode 100644 docs/html/tools/performance/traceview/index.jd (limited to 'docs/html/tools/performance') diff --git a/docs/html/tools/performance/allocation-tracker/index.jd b/docs/html/tools/performance/allocation-tracker/index.jd new file mode 100644 index 0000000..e71b584 --- /dev/null +++ b/docs/html/tools/performance/allocation-tracker/index.jd @@ -0,0 +1,148 @@ +page.title=Allocation Tracker Walkthrough +meta.tags="android, performance, profiling, tools, memoryleaks, memoryheap" +page.tags="android", "performance", "profiling", "tools", "memoryleaks", "memoryheap" +page.metaDescription=Record you app's memory allocations with their call stack to identify code that allocates and frees objects unnecessarily. +page.image=tools/performance/thumbnails/tools_allocation_tracker.png +page.article=true + + +@jd:body + + + + +
+ +

In this document

+ + +

You should also read

+ + +
+ + +

This walkthrough shows the basic usage and workflow for the Allocation Tracker tool in Android + Studio. Allocation Tracker records an app's memory allocations and lists all + allocated objects for the profiling cycle with their call stack, size, and allocating code.

+ +

What it's good for:

+ + + +

Before using Allocation Tracker, profile your code with the + Memory + Monitor Tool. If you see many garbage collection events in a short amount of time, use + Heap + Viewer to identify candidate object types, and Allocation Tracker to determine where this is + happening in your code.

+ +

Prerequisites

+ + + +

Working with Allocation Tracker

+ +

Allocation Tracker records each memory allocation that your app performs during the profiling + cycle. You tell Allocation Tracker to start recording and it logs allocations + until you tell it to stop.

+ +
+ diff --git a/docs/html/tools/performance/batterystats-battery-historian/charts.jd b/docs/html/tools/performance/batterystats-battery-historian/charts.jd new file mode 100644 index 0000000..cbe9d85 --- /dev/null +++ b/docs/html/tools/performance/batterystats-battery-historian/charts.jd @@ -0,0 +1,124 @@ +page.title=Battery Historian Charts +meta.tags="android, performance, profiling, tools, battery, historian, batterydrain +page.tags="android", performance", "profiling", "tools", "battery", "historian" "batterydrain" +page.metaDescription=Examine and interpret the collected battery usage data in your browser. +page.image=tools/performance/thumbnails/tools_battery_historian.png +page.article=true + +@jd:body + +
+ +

In this document

+ + +

You should also read

+ + +
+ + +

+ The Battery Historian chart graphs power-relevant events over time.

+ +

Each row shows a colored bar segment when a system component is active + and thus drawing current from the battery. The chart does not show how much battery was used by the + component, only that the app was active. Charts are organized by category.

+ +
+ +

+ Figure 1. Example of Battery Historian output. +

+
+ +

Battery usage categories

+ + + + +

Note: + Not every chart will show every category.

+ +

Filtering batterystats output

+ +

You can gather additional information from the batterystats.txt file + where you saved the output from the batterystats command.

+ +
+ +

+ Figure 2.Example of filtered batterystats output. +

+
+ +

Open the file in a text editor and search for:

+ +
    +
  1. Battery History: A time series of power-relevant events, such as + screen, Wi-Fi, and app launch. These are also visible through Battery Historian.
  2. + +
  3. Per-PID Stats: How long each process ran.
  4. + +
  5. Statistics since last charge: System-wide statistics, such as + cell signal levels and screen brightness. Provides an overall picture of what's happening + with the device. This information is especially useful + to make sure no external events are affecting your experiment.
  6. + +
  7. Estimated power use (mAh) by UID and peripheral: This is currently an + extremely rough estimate and should not be considered experiment data.
  8. + +
  9. Per-app mobile ms per packet: Radio-awake-time divided by packets sent. + An efficient app will transfer all its traffic in batches, so the lower this number the + better.
  10. + +
  11. All partial wake locks: All app-held wakelocks, by aggregate + duration and count.
  12. +
diff --git a/docs/html/tools/performance/batterystats-battery-historian/index.jd b/docs/html/tools/performance/batterystats-battery-historian/index.jd new file mode 100644 index 0000000..2072df9 --- /dev/null +++ b/docs/html/tools/performance/batterystats-battery-historian/index.jd @@ -0,0 +1,129 @@ +page.title=Batterystats & Battery Historian Walkthrough +meta.tags="android, performance, profiling, tools, battery, batterystats, historian, batterydrain +page.tags="android", "performance", "profiling", "tools", "battery", "batterystats", "historian", "batterydrain" +page.metaDescription=Collect battery usage data from your device and display it graphically in your browser. +page.image=tools/performance/thumbnails/tools_battery_historian.png +page.article=true + + +@jd:body + +
+ +

You should also read

+ + +
+ +

This walkthrough shows the basic usage and workflow for the Batterystats tool and the Battery + Historian script.

+ +

Batterystats collects battery data from your device, and Battery Historian converts that data + into an HTML visualization that you can view in your Browser. Batterystats is part of the Android + framework, and Battery Historian is open-sourced and available on GitHub at https://github.com/google/battery-historian.

+ +

What it's good for:

+ + + +

Prerequisites

+ + + +

Working with Batterystats & Battery Historian

+ + + +
    + +
  1. Download the open-source Battery Historion Python script from GitHub (https://github.com/google/battery-historian). +
  2. + +
  3. Unzip the file to extract the Battery Historian folder. Inside the folder, + find the historian.py file + and move it to the Desktop or another writable directory.
  4. + +
  5. Connect your mobile device to your computer.
  6. + +
  7. On your computer, open a Terminal window.
  8. + +
  9. Change to the directory where you've saved historian.py, +
    for example: + cd ~/Desktop
  10. + +
  11. Shut down your running adb server. +
    > adb kill-server
  12. + +
  13. Restart adb and check for connected devices. +
    > adb devices +
    +
    If you don't see any devices, make sure your phone is connected, and USB Debugging + is turned on, and then kill and restart adb.
  14. + +
  15. Reset battery data gathering. +
    > adb shell dumpsys batterystats --reset +

    Resetting erases old battery collection data; otherewise, the output will be huge.

    +
  16. + +
  17. Disconnect your device from your computer so that you are only drawing current from the + device's battery.
  18. + +
  19. Play with your app for a short time.
  20. + +
  21. Reconnect your phone.
  22. + +
  23. Make sure your phone is recognized: > adb devices
  24. + +
  25. Dump all battery data. This can take a while: +
    > adb shell dumpsys batterystats > batterystats.txt
  26. + +
  27. Create a HTML version of the data dump for Battery Historian: +
    > python historian.py batterystats.txt > batterystats.html
  28. + +
  29. Open the batterystats.htm file in your browser.
  30. + +
  31. Continue with + Battery Historian Charts. +
  32. + +
    + + Figure 1. Battery Historian output. +

    +
    +
+ + + diff --git a/docs/html/tools/performance/comparison.jd b/docs/html/tools/performance/comparison.jd new file mode 100644 index 0000000..cf4b712 --- /dev/null +++ b/docs/html/tools/performance/comparison.jd @@ -0,0 +1,133 @@ +page.title=Memory Profilers +meta.tags="android, performance, profiling, tools, memory, memoryleaks, garbagecollection" +page.tags="android", "performance", "profiling", "tools", "memory", "memoryleaks", "garbagecollection" +page.metaDescription=Heap Viewer, Memory Monitor, and Allocation Tracker are complementary tools that visualize the memory your app uses. +page.image=tools/performance/thumbnails/tools_memory_monitor.png +page.article=true + +@jd:body + +
+ +

In this document

+ + +

You should also read

+ + +
+ +

Heap Viewer, Memory Monitor, and Allocation Tracker are complementary tools that visualize the + memory your app uses.

+ +
    +
  1. Use the + + Memory Monitor Tool to find out whether undesirable garbage collection (GC) event patterns might + be causing your performance problems.
  2. + +
  3. Run + + Heap Viewer to identify object types that get or stay allocated + unexpectedely or unecessarily.
  4. + +
  5. Use + + Allocation Tracker to identify where in your code the problem might be.
  6. +
+ +

Memory Monitor

+ +
+
+ +

+ Figure 1. Memory Monitor. +

+
+ + + +

Heap Viewer

+ +
+ +

+ Figure 2. Heap Viewer. +

+
+ + + +

Allocation Tracker

+ +
+ +

+ Figure 3. Allocation Tracker. +

+
+ + diff --git a/docs/html/tools/performance/debug-gpu-overdraw/index.jd b/docs/html/tools/performance/debug-gpu-overdraw/index.jd new file mode 100644 index 0000000..e6b85fd --- /dev/null +++ b/docs/html/tools/performance/debug-gpu-overdraw/index.jd @@ -0,0 +1,156 @@ +page.title=Debug GPU Overdraw Walkthrough +meta.tags="android, performance, profiling, tools, rendering, overdraw" +page.tags="android", "performance", "profiling", "tools", "rendering", "overdraw" +page.metaDescription=Use color-coding to show how many times each pixel is redrawn on the screen to reduce rendering overhead. +page.image=tools/performance/thumbnails/tools_debug_gpu_overdraw.png +page.article=true + + +@jd:body + + + + + +

This walkthrough shows how to visualize overdraw on your mobile device by color-coding + interface elements based on how often they are drawn underneath.

+ +

What it's good for:

+ + + +

Prerequisites

+ + + + +

Visualizing Overdraw on your Mobile Device

+ + diff --git a/docs/html/tools/performance/heap-viewer/index.jd b/docs/html/tools/performance/heap-viewer/index.jd new file mode 100644 index 0000000..9ca0c47 --- /dev/null +++ b/docs/html/tools/performance/heap-viewer/index.jd @@ -0,0 +1,177 @@ +page.title=Heap Viewer Walkthrough +meta.tags="android, performance, profiling, tools, memory, memoryleaks, memoryheap" +page.tags="android", "performance", "profiling", "tools", "memory", "memoryleaks", "memoryheap" +page.metaDescription=Report in real-time how many objects of what types and sizes your application is allocating and find memory leaks. +page.image=tools/performance/thumbnails/tools_heap_viewer.png +page.article=true + +@jd:body + + + + + + +

This walkthrough shows the basic usage and workflow for the Heap Viewer tool. Heap Viewer + reports in real-time what types of objects your application has allocated, how many, and + their sizes on the heap.

+ +

What it's good for:

+ + + +

Prerequisites

+ + + +

Working with Heap Viewer

+ + diff --git a/docs/html/tools/performance/hierarchy-viewer/index.jd b/docs/html/tools/performance/hierarchy-viewer/index.jd new file mode 100644 index 0000000..ebf23e5 --- /dev/null +++ b/docs/html/tools/performance/hierarchy-viewer/index.jd @@ -0,0 +1,330 @@ +page.title=Hierarchy Viewer Walkthrough +meta.tags="android, performance, profiling, tools, rendering, hierarchyviewer" +page.tags="android", "performance", "profiling", "tools", "rendering", "hierarchyviewer" +page.metaDescription=Visualize your app's view hierarchy to help you simplify your layouts. +page.image=tools/performance/thumbnails/tools_hierarchy_viewer.png +page.article=true + +@jd:body + + + + + +

This walkthrough shows the basic usage and workflow for the Hierarchy Viewer tool.

+ +

The Hierarchy Viewer tool visualizes your app's view hierarchy and + profiles the relative rendering speed for each view. + +

What it's good for:

+ + + +

Prerequisites

+ + + +

Working with Hierarchy Viewer

+ + diff --git a/docs/html/tools/performance/hierarchy-viewer/profiling.jd b/docs/html/tools/performance/hierarchy-viewer/profiling.jd new file mode 100644 index 0000000..b505228 --- /dev/null +++ b/docs/html/tools/performance/hierarchy-viewer/profiling.jd @@ -0,0 +1,169 @@ +page.title=Profiling with Hierarchy Viewer +meta.tags="android, performance, profiling, tools, rendering, hierarchyviewer +page.tags="android", "performance", "profiling", "tools", "rendering", "hierarchyviewer" +page.metaDescription=Profile the relative rendering speed for each view. +page.image=tools/performance/thumbnails/tools_hierarchy_viewer_profiling.png +page.article=true + +@jd:body + + + + + +

This walkthrough shows you how to profile your app's view hiearchy with + Hierarchy Viewer, and how to interpret the results.

+ +

Prerequisites

+ + + +

Profiling Steps

+ + + +

Interpreting Hierarchy Viewer Profiling Results

+ +

Hierarchy Viewer measures the relative performance of a + node, so there are always red nodes in a profile, and it + doesn't necessarily mean that view is too slow for the users of + your app.

+ +

Hierarchy Viewer software rasterizes your Activity to acquire the timing + information. Rasterization is the process of taking a high-level primitive, such as a + circle or a vector font, and turning it into pixels on the screen. Typically, + rasterization is done by the GPU on your device, but in the case of + software rasterization, rendering is done on the CPU with + ordinary software. This means that the absolute + reported timings are correct relative to each other, but are bloated and vary + depending on the overall and changing CPU workload on your device and PC. Profile + several times to get a feel for the average measurements.

+ +

The following are guidelines for interpreting Hierarchy Viewer profiling output.

+ +

A red node is a potential problem in any situation where your app has + unexpectedly slow performance. In a relative setting, there is always a + slowest node; make sure it is the node you expect. + The following examples illustrate how to interpret red dots.

+ + diff --git a/docs/html/tools/performance/hierarchy-viewer/setup.jd b/docs/html/tools/performance/hierarchy-viewer/setup.jd new file mode 100644 index 0000000..aaac1ca --- /dev/null +++ b/docs/html/tools/performance/hierarchy-viewer/setup.jd @@ -0,0 +1,89 @@ +page.title=Device Setup for Hierarchy Viewer +meta.tags="android, performance, profiling, tools, rendering, hierarchyviewer" +page.tags="android", "performance", "profiling", "tools", "rendering", "hierarchyviewer" +page.metaDescription=Set up your mobile device to work with Hierarchy Viewer. +page.image=tools/performance/thumbnails/tools_hierarchy_viewer.png +page.article=true + +@jd:body + + + +

To run Hierarchy Viewer, you must enable Developer Options on your mobile device and perform + some setup on your computer.

+ +

Configuring Devices

+ +
    +
  1. Enable Developer Options + on your mobile device.

  2. + +
  3. Depending on the type of device you have, do one of the following: +
      +
    • If you have a locked device running Android 4.0 or lower, follow the instructions + for installing and configuring ViewServer. +
    • +
    • If you have an unlocked device running Android 4.0 or lower, + no further configuration is needed.
    • +
    • If you have a device running Android 4.1 or higher, you must set an environment + variable on your development machine. For more information, + see Setting the ANDROID_HVPROTO variable +
    +
  4. +
+ + +

Setting the ANDROID_HVPROTO variable

+ +

Windows

+ +
    +
  1. Click My Computer > Property > Advanced > Environment Variables.
  2. + +
  3. Click New.
  4. + +
  5. In variables name put: ANDROID_HVPROTO
  6. + +
  7. In variable value put: ddm
  8. + +
  9. Click OK<./li> +
+ +

Mac

+ +
    +
  1. Edit ~/.bash_profile
  2. + +
  3. Add: +
    #Hierarchy Viewer Variable +
    export ANDROID_HVPROTO=ddm
    +
  4. + +
  5. source ~/.bash_profile
  6. +
+ +

Linux

+ +
    +
  1. Edit ~/.bash_profile
  2. + +
  3. Add: + +
    #Hierarchy Viewer Variable +
    export ANDROID_HVPROTO=ddm
    +
  4. + +
  5. source ~/.bash_profile
  6. +
diff --git a/docs/html/tools/performance/importing-legacy-apps.jd b/docs/html/tools/performance/importing-legacy-apps.jd new file mode 100644 index 0000000..cee3519 --- /dev/null +++ b/docs/html/tools/performance/importing-legacy-apps.jd @@ -0,0 +1,149 @@ +page.title=Importing Legacy Apps into Android Studio +meta.tags="android, performance, profiling, tools" +page.tags="android", "performance", "profiling", "tools" +page.metaDescription=Required changes when importing legacy apps into Android Studio. +page.article=true + +@jd:body + +
+ +

In this document

+ + +

You should also read

+ + +
+ + +

Importing some pre-Android-1.0 projects into Android 1.0 or newer can trigger a series of + errors. This document shows you how to resolve them, using a version of the Sunshine app used in + the Android Fundamentals Udacity Course as an + example.

+ +

CAVEAT: As with all documentation of this kind, the details are likely to vary for each + application and each update of Android Studio.

+ +

Prerequisites

+ + + +

Steps for Importing Sunshine into Android Studio 1.1.0

+ +
    +
  1. Download Sunshine ZIP from GitHub: https://github.com/udacity/sunshine/tree/6.10-update-map-intent. + (If you are having any problems with Android Studio or the app, use the following version, or + your own app, to follow along with the example.https://github.com/udacity/sunshine/tree/3.13-add-share-action-provider) + +
  2. Unzip the application to extract the code folder.
  3. + +
  4. Start Android Studio. (This works best if you close all projects, then restart.)
  5. + +
  6. Click Import project (Eclipse ADT, Gradle, etc.). +
    +
  7. + +
  8. In the popup, find and select the Sunshine-6-10-updated-map-intent folder and click + OK. +
    +
  9. + +
  10. If prompted, choose a destination folder for your project. If prompted to choose a build + system, choose Gradle. (These prompts vary, depending on your project and Android Studio + version.) If you need more guidance, see this Lynda tutorial.
  11. + +
  12. Wait for the import to complete. If you see no errors, you are now ready to work with your + app. + +

    If you get a Gradle error:

    + +
  13. If you get a Gradle error, you have some extra work to do.(Because the Import + didn(t finish, at this point, you may only see the Gradle + Scripts directory in your Project view.)
  14. + +
  15. You may see the link Install missing platform(s) and sync + project, or a link to install missing build tools. + Click whatever link and + proceed.
  16. + +
  17. The next time through, your build will fail with: +
    +
  18. + +
  19. Click the Fix plugin version and re-import project link + in the error message. This will rebuild the app and present you with new of errors. +
    +
  20. + +
  21. Click the Gradle Settings link in the error message.
  22. + +
  23. Check the Use auto-import and click OK. +
    +
  24. + +
  25. Expand the project hierarchy and find the build.gradle file.The file you are looking + for is not the one showing at the top level, but the one inside Sunshine > + app > build.gradle, as shown below. +
    +
  26. + +
  27. Double-click the build.gradle file.
  28. + +
  29. Make the following changes to the file:
  30. +
      +
    • Set compileSdkVersion 21
    • + +
    • Set targetSdkVersion 21
    • + +
    • Replace runProguard with minifyEnabled
    • +
    + +

    Your file should look like this:

    + + + +
  31. Save (Ctrl-S).
  32. + +

    For the following two messages (Steps 18/19), what you see might vary. You might see either + message or both messages in sequence. Click the appropriate links to continue until the Language + Level Changed dialog opens.

    + +
  33. In the code view bar, click the Try again link. +
    +
  34. + +
  35. If you see these warnings, click the Sync now link. +
    +
  36. + +
  37. In the Language Level Changed dialog, click Yes. And if you get the Gradle Running + dialog, Yes again. +
    +
  38. + +
  39. After the project reloads, run the app on your device. (If it crashes the first time, try + again, and it will run.) +
    +
  40. +
+ diff --git a/docs/html/tools/performance/index.jd b/docs/html/tools/performance/index.jd new file mode 100644 index 0000000..fa5af86 --- /dev/null +++ b/docs/html/tools/performance/index.jd @@ -0,0 +1,73 @@ +page.title=Performance Profiling Tools +meta.tags="android, develop, performance, profiling, tools, gather" +page.tags="android", "develop", "performance", "profiling", "tools" "gather" +page.metaDescription=Android Studio profiling tools for evaluating your app's performance. +page.article=true + +@jd:body + +

Putting pixels on the screen involves four primary pieces of hardware. + To greatly simplify, the CPU computes display lists, the GPU renders images to + the display, the memory stores images and data, and the battery provides + electrical power. Each of these pieces of hardware has constraints; pushing + or exceeding those constraints causes your app to be slow, have + bad display performance, or exhaust the battery. + +

To discover what causes your specific performance problems, you need to + take a look under the hood, use tools to collect data about your app's + execution behavior, surface that data as lists and + graphics, understand and analyze what you see, and improve your code.

+ +

Android Studio and your device provide profiling tools to record and + visualize the rendering, compute, memory, and battery performance of your + app.

+ +

Rendering Analysis Tools

+ +

Visualize the rendering behavior and performance of your app.

+ +
+
+
+
+ +

Memory Analysis Tools

+ +

Visualize the memory behavior and performance of your app.

+ +
+
+
+
+ +

Compute Analysis Tools

+ +

Visualize the CPU behavior and performance of your app.

+ +
+
+
+
+ +

Battery Analysis Tools

+ +

Visualize the battery behavior and performance of your app.

+ +
+
+
+
+ + diff --git a/docs/html/tools/performance/memory-monitor/index.jd b/docs/html/tools/performance/memory-monitor/index.jd new file mode 100644 index 0000000..756ca14 --- /dev/null +++ b/docs/html/tools/performance/memory-monitor/index.jd @@ -0,0 +1,172 @@ +page.title=Memory Monitor Walkthrough +meta.tags="android, performance, profiling, tools, memory, memoryleaks, garbagecollection, memorymonitor" +page.tags="android", "performance", "profiling", "tools", "memory", "memoryleaks", "garbagecollection", "memorymonitor" +page.metaDescription=Graph memory usage and garbage collection events for your app in real-time. +page.image=tools/performance/thumbnails/tools_memory_monitor.png +page.article=true + +@jd:body + + + + + + +

This walkthrough shows the basic usage and workflow for the Memory Monitor tool in Android + Studio. Memory Monitor reports in real-time how your app allocates memory.

+ +

What it's good for:

+ + + +

Prerequisites

+ + + +

Working with Memory Monitor

+ + + + diff --git a/docs/html/tools/performance/profile-gpu-rendering/index.jd b/docs/html/tools/performance/profile-gpu-rendering/index.jd new file mode 100644 index 0000000..74862b5 --- /dev/null +++ b/docs/html/tools/performance/profile-gpu-rendering/index.jd @@ -0,0 +1,181 @@ +page.title=Profiling GPU Rendering Walkthrough +meta.tags="android, performance, profiling, tools, rendering, gpu" +page.tags="android", "performance", "profiling", "tools", "rendering", "gpu" +page.metaDescription=Overlay a graph on your device, showing how long it takes to render UI elements relative to the 16-ms-per-frame benchmark. +page.image=tools/performance/thumbnails/tools_profile_gpu_rendering.png +page.article=true + +@jd:body + + + +
+ +

In this document

+ + +

You should also read

+ + +
+ +

This walkthrough shows how to use Profile GPU Rendering on your mobile device.

+ +

Profile GPU Rendering gives you a quick visual representation of how much time it takes to + render the frames of a UI window relative to the 16-ms-per-frame benchmark.

+ +

What it's good for:

+ + + +

Prerequisites

+ + + +

Working with Profile GPU Rendering

+ +
+ + + + + diff --git a/docs/html/tools/performance/systrace/index.jd b/docs/html/tools/performance/systrace/index.jd new file mode 100644 index 0000000..97099a0 --- /dev/null +++ b/docs/html/tools/performance/systrace/index.jd @@ -0,0 +1,182 @@ +page.title=Systrace Walkthrough +meta.tags="android, performance, profiling, tools, compute, systrace" +page.tags="android", "performance", "profiling", "tools", "compute", "systrace" +page.metaDescription=Collect system and application process execution data to identify performance bottlenecks. +page.image=tools/performance/thumbnails/tools_systrace.png +page.article=true + +@jd:body + + + +
+ +

In this document

+ + +

You should also read

+ + +
+ +

This walkthrough shows the basic usage and workflow for the Systrace tool in the Android + Device Monitor.

+ +

Systrace collects system and application process execution data and generates detailed, + interactive reports from devices running Android 4.1 and higher.

+ +

What it's good for:

+ + + +

Prerequisites

+ + + +

Working with Systrace

+ + + + diff --git a/docs/html/tools/performance/thumbnails/tools_allocation_tracker.png b/docs/html/tools/performance/thumbnails/tools_allocation_tracker.png new file mode 100644 index 0000000..cbae4cd Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_allocation_tracker.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_battery_historian.png b/docs/html/tools/performance/thumbnails/tools_battery_historian.png new file mode 100644 index 0000000..d1d58ac Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_battery_historian.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_debug_gpu_overdraw.png b/docs/html/tools/performance/thumbnails/tools_debug_gpu_overdraw.png new file mode 100644 index 0000000..ff402d0 Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_debug_gpu_overdraw.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_heap_viewer.png b/docs/html/tools/performance/thumbnails/tools_heap_viewer.png new file mode 100644 index 0000000..d9028d0 Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_heap_viewer.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_hierarchy_viewer.png b/docs/html/tools/performance/thumbnails/tools_hierarchy_viewer.png new file mode 100644 index 0000000..064efea Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_hierarchy_viewer.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_hierarchy_viewer_profiling.png b/docs/html/tools/performance/thumbnails/tools_hierarchy_viewer_profiling.png new file mode 100644 index 0000000..e9824a4 Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_hierarchy_viewer_profiling.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_memory_monitor.png b/docs/html/tools/performance/thumbnails/tools_memory_monitor.png new file mode 100644 index 0000000..c761141 Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_memory_monitor.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_profile_gpu_rendering.png b/docs/html/tools/performance/thumbnails/tools_profile_gpu_rendering.png new file mode 100644 index 0000000..c86fb14 Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_profile_gpu_rendering.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_systrace.png b/docs/html/tools/performance/thumbnails/tools_systrace.png new file mode 100644 index 0000000..567a8a7 Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_systrace.png differ diff --git a/docs/html/tools/performance/thumbnails/tools_traceview.png b/docs/html/tools/performance/thumbnails/tools_traceview.png new file mode 100644 index 0000000..16e6bdd Binary files /dev/null and b/docs/html/tools/performance/thumbnails/tools_traceview.png differ diff --git a/docs/html/tools/performance/traceview/index.jd b/docs/html/tools/performance/traceview/index.jd new file mode 100644 index 0000000..4a3f190 --- /dev/null +++ b/docs/html/tools/performance/traceview/index.jd @@ -0,0 +1,292 @@ +page.title=Traceview Walkthrough +meta.tags="android, performance, profiling, tools, compute, traceview" +page.tags="android", "performance", "profiling", "tools", "compute", "traceview" +page.metaDescription=Log method execution over time and inspect execution data, per-thread timelines, and call stacks to track down performance issues in your source code. +page.image=tools/performance/thumbnails/tools_traceview.png +page.article=true + +@jd:body + + + +
+ +

In this document

+ + +

You should also read

+ + +
+ +

This walkthrough shows the basic usage and workflow for the Traceview tool. Traceview logs + method execution over time and shows execution data, per-thread timelines, and call stacks.

+ +

What it's good for:

+ + + +

Prerequisites

+ + + +

Working with Traceview

+ + -- cgit v1.1