spikey_richie Posted May 8, 2013 Share Posted May 8, 2013 I'm not a developer, and I don't pretend to be; I'm a test analyst. However, I'm working on an agile product which requires me to use some development tools such as MonoDevelop, Xamarin, ADT, XCode, VS 2012 and a few other bits and bobs. The product is not something I can share details of, however I can say it's going to be cross platform. Anyway, I digress. My current involvement is to assist in running a proof of concept on Xamarin, and to establish whether it'll fit out needs. Whilst installing all of the bits 'n' bobs I need, I have been spending a lot of time on the Android developer site and stumbled across a useful profiling tool called DDMS (Dalvik Debug Monitor Server). Whilst it's primarily aimed at plugging into the emulator(s), it will also support physical devices provided you have the correct USB driver and the device is in developer mode (don't quote me on that last bit). It seems like a great tool for monitoring CPU & memory usage. I'm one of these people who believes what tools like GoTaskManager and Device Info when it says the CPU is running at > 50%, and the memory consumption is up at 80%+... it seems these apps don't give you a good indication of what is actually happening. DDMS appears to be a better tool to tell you if your device really is chomping up all your resources. So here's how to get going with DDMS: 1 - Download the SDK (ADT bundle) from here 2 - Unzip it to a location on your machine (doesn't matter where) 3 - Go ahead and run eclipse.exe from ..\adt-bundle-windows-x86_64-20130219\eclipse\ 3a - You might get a warning that JDK or JRE is missing, so go ahead and sort that out before re-launching ADT (eclipse.exe) 4 - Once you have ADT up and running, click Window > Open Perspective > DDMS 5 - Put your device into Developer mode by going to Settings > Developer Options and enable USB debugging 5a - If you don't see a Developer option, go into Settings > About Device > touch the Build Number 7 times, and you'll get a toast message telling you that you're now a developer 6 - Attach your device to your PC, and it should appear on the left under Devices. If it doesn't, wait for the ADB Interface driver to install 7 - Once your device is listed, you can start probing it. The most useful tab (I found) is the System Information tab which provides you with CPU load and Memory usage. The LogCat is also very useful, but isn't easy to read. Because of the way DDMS integrates with Dalvik, you won't be able to get a list of processes and Heap data as you can with an emulator. My device is running at < 10% CPU whilst idle, and about 50% Memory used with 'standard' apps running (FB, Instagram, K9 mail, Lookout, WhatsApp etc...) Anyway, enjoy :) Link to comment https://www.neowin.net/forum/topic/1151112-harness-the-capabilities-of-ddms-to-assist-in-problem-solving/ Share on other sites More sharing options...
Recommended Posts