Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - memory/CPU usage [closed]

Tags:

android

I have two android applications that I have developed. I need to compare the two app's for a project and I am trying to find tools that will allow me to capture data about the applications such as computational use in terms of CPU/memory/data transfer etc. Also is there anyway to compare the different effects the apps would have on battery usage?

Thanks,

like image 682
Joseph Avatar asked Apr 02 '12 13:04

Joseph


People also ask

Why is my RAM usage so high when nothing is running Android?

Apps can go rogue, or the system may be acting abnormally, which would cause lag, errors, and other failures. This is why clearing out the RAM may be good now and then. Then you have those apps that are simply worthless, otherwise known as bloatware. Carrier and manufacturer pre-installed apps are usually unnecessary.

Do closed apps use RAM?

It's no more used or unused when the program is open than when the program is closed. Memory is used if it contains useful information. It contains useful information both while the program is running and when the program is no longer running.

Is unused RAM wasted RAM in Android?

The Android platform runs on the premise that free memory is wasted memory. It tries to use all of the available memory at all times. For example, the system keeps apps in memory after they've been closed so the user can quickly switch back to them.

Why my phone RAM is always full?

The algorithm that the Android OS uses figures out which apps you use frequently and keeps those apps in the memory for faster performance—they will load much quicker next time you need them. The system then removes the rest from the memory whenever more RAM is required for some other task.


1 Answers

For profiling CPU usage in your app (like percentage of time spend in individual methods), check out traceview. It's an executable in your tools directory that comes with the Android SDK.

For memory usage, you can use Eclipse Memory Analyzer (MAT) (there's a standalone option if you prefer another IDE).

For battery usage, there's a project called PowerTutor which helps estimate power consumed by the CPU, network interface, display, and GPS.

like image 150
wsanville Avatar answered Sep 26 '22 23:09

wsanville