开发者

Profiling Android apps with Eclipse plugin TPTP instead of traceview

开发者 https://www.devze.com 2023-02-21 12:12 出处:网络
The standard way to profile an Android application in Eclipse is using the plugin DDMS and creating a trace file with all the information inside. If you want to view this information you can use \"tra

The standard way to profile an Android application in Eclipse is using the plugin DDMS and creating a trace file with all the information inside. If you want to view this information you can use "traceview". I didn't like my first experience with this application because you can't filter the results. You have a lot of method calls for starting your application and you cannot filter only your code.

I have been looking for an alternative method. I found this tutorial Using Eclipse* TPTP to Visualize Google* Android* Profiling Data that explains how you can use the Eclipse Test & Performance Tools Platform (TPTP) Profiling tool to visualize Android profiling data. Thanks to this previous post Permission to write to the SD card I managed to take my trace file from the Android Emul开发者_开发百科ator into my file systems. The next step is converting this .trace file into a TPTP .trcxml file. I didn't find this converter they talk about.

Anyone knows where I can find this converter? Do you know another way to analyze this trace file with TPTP or with another more mature FREE profiler tool? Do you know another way to profile Android application? Thanks in advance


Edit 1:

I found some interesting tool you can use to analyze Android apps memory usage. In order to get memory usage from Eclipse you have to "Dump HPROF file" from the DDMS prospective. Before doing that you have to choose in the DDMS preference panel, when it says "HPROF Action", the "Save to disk" action. So from now on when you dump HPROF file you'll be asked where you want to save your .hprof file. You have to convert this file with the Android tool "hprof-conv" you can find in your Android SDK installation under the directory "./tools". Finally now you can use the Eclipse MAT plugin to view the memory usage stats. I hope it will help someone else. If anyone knows something else about profiling Android apps it will appreciated. Thanks


From DeveloperWorks

To read a trcxml file content, you should use "File" > "Import..." > "Profiling and Logging" > "Profiling File" option to import the resource and view the trace data with TPTP views

Update:

Are you looking for hprof-conv? Should be in the sdk/tools directory

Update2:

Sorry, I didn't see your update, the conversion tool is available as an attachment from the source provided at EclipseWorld 2005. Hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消