Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Last active February 1, 2016 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frogermcs/4ffe9a41a93b05f9e68f to your computer and use it in GitHub Desktop.
Save frogermcs/4ffe9a41a93b05f9e68f to your computer and use it in GitHub Desktop.
Dagger2Metrics setup
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.frogermcs.dagger2metrics:dagger2metrics-plugin:0.2'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.frogermcs.dagger2metrics'
Dagger2Metrics.WARNING_1_LIMIT_MILLIS // 30ms
Dagger2Metrics.WARNING_2_LIMIT_MILLIS // 50ms
Dagger2Metrics.WARNING_3_LIMIT_MILLIS // 100ms
public class ExampleApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
//Use it only in debug builds
if (BuildConfig.DEBUG) {
Dagger2Metrics.enableCapturing(this);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment