Skip to content

0x03c Startup_zh

hui.zhao edited this page Dec 7, 2019 · 2 revisions

Startup

安装

使用如下配置进行安装

GodEye.instance().install(GodEyeConfig.defaultConfigBuilder().withStartupConfig(new GodEyeConfig.StartupConfig()).build());

或者

<startup />

AndroidGodEye 3.0开始启动模块也需要安装

数据生产与消费

启动数据需要自行生产,在App完全启动之后调用

StartupInfo startupInfo = new StartupInfo(StartupInfo.StartUpType.COLD, homeEndTime - mApplicationStartTime)
GodEyeHelper.onAppStartEnd(startupInfo);

使用如下方式监听模块输出的数据:

try {
            GodEye.instance().observeModule(GodEye.ModuleName.STARTUP, new Consumer<StartupInfo>() {
                @Override
                public void accept(StartupInfo startupInfo) throws Exception {
                }
            });
        } catch (UninstallException e) {
            e.printStackTrace();
        }

在启动结束之后进行输出,startupInfo记录了启动的耗时,是否冷热启动等等

DebugMonitor Dashboard

android_god_eye_dashboard2

Clone this wiki locally