DebugLog 打印方法執行時間

DebugLog 打印方法執行時間

用於方便調試性能問題的打印插件。給訪法加上@DebugLog,就能輸出該方法的調用參數,以及執行時間。android

Project gradle配置

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0'

        //用於方便調試性能問題的打印插件。給訪法加上@DebugLog,就能輸出該方法的調用參數,以及執行時間
        classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
    }
}

Application module gradle 配置

apply plugin: 'com.android.application'
//用於方便調試性能問題的打印插件。給訪法加上@DebugLog,就能輸出該方法的調用參數,以及執行時間
apply plugin: 'com.jakewharton.hugo'

repositories {
    flatDir {
        dirs 'libs'
    }
    mavenCentral()
    jcenter()
}
相關文章
相關標籤/搜索