Search in sources :

Example 1 with ActivityLaunchMetrics

use of com.frogermcs.androiddevmetrics.internal.metrics.ActivityLaunchMetrics in project AndroidDevMetrics by frogermcs.

the class AndroidDevMetrics method setupMetrics.

private void setupMetrics() {
    Dagger2GraphAnalyzer.setEnabled(enableDagger2Metrics);
    InitManager.getInstance().initializedMetrics.clear();
    ActivityLifecycleAnalyzer.setEnabled(true);
    if (enableAcitivtyMetrics) {
        MethodsTracingManager.getInstance().init(context);
        ActivityLaunchMetrics activityLaunchMetrics = ActivityLaunchMetrics.getInstance();
        ((Application) context.getApplicationContext()).registerActivityLifecycleCallbacks(activityLaunchMetrics);
        ChoreographerMetrics.getInstance().setMaxFpsForFrameDrop(maxFpsForFrameDrop);
        ChoreographerMetrics.getInstance().setIntervalMillis(intervalMillis);
        ChoreographerMetrics.getInstance().start();
    }
    if (showNotification) {
        showNotification();
    }
}
Also used : ActivityLaunchMetrics(com.frogermcs.androiddevmetrics.internal.metrics.ActivityLaunchMetrics) Application(android.app.Application)

Aggregations

Application (android.app.Application)1 ActivityLaunchMetrics (com.frogermcs.androiddevmetrics.internal.metrics.ActivityLaunchMetrics)1