Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

统计安卓所有方法执行耗时 ,用于开发 测试时分析性能,分析ANR,Calculate android method time,

Notifications You must be signed in to change notification settings

dikeboy/DhMethodTime

Repository files navigation

DhMethodTime

What's this

DhMethodTime 是一个再debug下统计所有安卓方法耗时的插件,引用方便,利用javassist在编译时完成统计代码注入,realase版本下不会执行注入, 方便开发时测试,分析方法耗时,性能

An android gradle plugin for calculating time of all Android methods

jcentery is closed and it move to local file

How to use

Gradle->buildsrc->upload->uploadArchive

mkdir in app/plugins. copy app/repo/.../dhmtime-1.0.0.jar to plugins/

 repositories {
 google()
 jcenter()
 flatDir name: 'localRepository', dir: './app/plugins'
 }

base build.gradle:

classpath 'com.lin.dhmtime:dhmtime:1.0.0'
classpath 'org.javassist:javassist:3.28.0-GA'

App build.gradle

apply plugin: "dhmtime"
...
...
dhMCConfig {
 minTime(0l) //>= second will log print
 setLogFilter("testlin") //android log filter name
 setLogEngine("android.util.Log.e") // default android.util.Log.i you can use your self class
}

Log print

Imag

参考

About

统计安卓所有方法执行耗时 ,用于开发 测试时分析性能,分析ANR,Calculate android method time,

Resources

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /