-
Couldn't load subscription status.
- Fork 347
0x02b Apply AndroidGodEye for Release_en
hui.zhao edited this page Nov 24, 2019
·
9 revisions
You may want to use AndroidGodEye to monitor the real user's app performance in the production environment. Generally, you can call the observeModule method to consume datas and report to the server in the callback:
try {
GodEye.instance().observeModule(GodEye.ModuleName.HEAP, new Consumer<HeapInfo>() {
@Override
public void accept(HeapInfo heapInfo) throws Exception {
Log.d("AndroidGodEye",String.valueOf(heapInfo));
}
});
} catch (UninstallException e) {
e.printStackTrace();
}Because some modules have some impact on performance, you need to pay special attention to the following points if you use AndroidGodEye in a production environment:
- FPS, Thread and Methodcanary modules will have significant impact on performance in theory. It is not recommended to install them in release. If you need FPS module very much, please pay attention to set
intervalmillisconfig to adjust the output frequency and conduct adequate performance test - In the module configuration of leakdetector (leakmemory), please set
debugto false anddebugNotificationto false, so that it only detect the leak event but not the leaked GC root path and other details - In the module configuration of Sm (block), please set
debugNotifyto false, and pay attention to set the threshold value to prevent excessive reporting of blocking - If you care about apk size, please don't
apply plugin: 'cn.hikyson.methodcanary.plugin'inbuild.gradleof application module project('com.android.application') because it will insert some code into every method