Traceview

We showed you earlier how you can collect statistics about the execution of methods in your application. Using DDMS, you can perform method profiling, after which the Traceview window will be shown with the results. Figure 11–4 shows what this looks like.

Image

Figure 11–4. Traceview

Using the technique shown earlier, you get the results for all methods in the application. You can also get more specific tracing information for your Android application by using the android.os.Debug class, which provides a start-tracing method (Debug.startMethodTracing(“basename”)) and a stop-tracing method (Debug.stopMethodTracing()). Android will create ...

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.