jakewharton大神的hugo插件—让你轻松的知道程序方法的运行耗时

          又尝试使用了jakewharton大神的另一个插件——hugo。这个插件可以非常方便的知道程序方法的耗时时间,方便程序员做出效率上面的选择调整。

         jakewharton大神该项目在github上面的托管地址https://github.com/JakeWharton/hugo

         在项目中添加

buildscript {
  repositories {
    mavenCentral()
  }

  dependencies {
    classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
  }
}

apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.hugo'
       然后在方法前面加上@DebugLog

          在打印的列表搜索方法名称,就可以知道该方法的运行耗时。

猜你喜欢

转载自blog.csdn.net/weixin_30267253/article/details/72368605