Android 2.3 (API level 9)ProgramPerformance Diagnosis tool, which is strictmode.
Currently, strictmode has the following capabilities and restrictions:
1. Thread-based monitoring of disk read/write, network operations, and custom time-consuming operations;
2. Monitoring of VM process-based object leakage (activity object, SQLite object, ununregistered object, not closed object;
3. Cross-process time-consuming operations can be detected (of course, synchronous operations must be performed );
4. Network and disk operations in JNI are not supported currently.
With the evolution of Android, strictmode will become more and more powerful.
When strictmode detects a specified event, it notifies you in the specified way: crash, pop-up dialog box, pop-up screen, logcat, Dropbox.
Why is disk operations time-consuming?
Almost all Android devices useFlash memory is used for storage, and the read/write speed is comparable to that of SSD. However, the file system built on it may limit the read/write concurrency, making the read/write operation time unstable.
For example, the widely used yaffs file system uses a global synchronization lock, allowing only one disk read/write operation at a time, which makes the disk read/write time quite unreliable.
In the release version of the program, be sure to turn off strictmode, but you can keep it in the beta version to collect performance data from volunteers.
Reference connection:
Http://android-developers.blogspot.com/2010/12/new-gingerbread-api-strictmode.html
Https://code.google.com/p/zippy-android/