I would like to detect how fast is the device on which my Android application is running?
Is there any API to do it on Android? Or do I have to benchmark it by myself?
If the device has slow CPU I would like to turn off some time consuming operations like animations or limit maximum number of simultaneous HTTP request.
If you're wondering how to check your clock speed, click the Start menu (or click the Windows* key) and type “System Information.” Your CPU's model name and clock speed will be listed under “Processor”.
Current Mobile Phone speed comes in (megahertz)MHz or (Getahertz)GHz value. Today's average best mobile processors have clock speeds ranging from 1.8 GHz to 2.8 GHz.
Enable the profiler On your device, go to Settings and tap Developer Options. In the Monitoring section, select Profile GPU Rendering or Profile HWUI rendering, depending on the version of Android running on the device.
The best way to do it in my opinion is to monitor the time it takes to do these actions. If it is taking too much time, then the system is too slow and you can disable fancy features until it is fast enough.
Reading the CPU speed or other specs and attempting to judge the system speed is a bad idea. Future hardware changes might make these specs meaningless.
Look at the Pentium 4 vs the Core 2 for example. Which is the faster CPU, a 2.4 GHz Pentium 4, or the 1.8 GHz Core 2? Is a 2 GHz Opteron faster than a 1.4 GHz Itanium 2? How are you going to know what kind of ARM CPU is actually faster?
To get system speed ratings for Windows Vista and 7 Microsoft actually benchmarks the machine. This is the only halfway accurate method to determine system capabilities.
It looks like a good method is to use SystemClock.uptimeMillis().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With