Giter VIP home page Giter VIP logo

lib_instrument_thread's Introduction

Thread

1.使用

  • 1,初始化,建议在APP启动的时候就去初始化
ThreadHelp.monitorThreadInit();
  • 2,开始一次监控,建议在用了一会之后,去获取一次。然后用一会儿再去获取一次。
合适的位置去监控
ThreadHelp.monitorAllThread();
  • 3,开始线程创建销毁监控,建议在APP启动的时候就去监听
ThreadHookHelp.monitorThreadCreate();
  • 4,TAG过滤
线程死锁:ThreadHelp
线程CPU占用监控:ThreadAlive
线程创建销毁监控:直接使用远程依赖 ThreadHookHelp  ThreadMethodHook
线程创建销毁监控:源码编译 ThreadHookSrcHelp  ThreadHookSrcMethod

2. 功能说明

1,监控线程是否死锁
2,线程CPU占用率监控
3,监控线程创建和销毁

3.项目引用

  • 1,root build.gradle中
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.8'
  • 2,module build.gradle中
apply plugin: 'android-aspectjx'
implementation 'com.github.zhuyidian.lib_Instrument_Thread:thread:V1.1.5'
implementation 'com.github.zhuyidian.lib_Instrument_Thread:threadhooksrc:V1.1.5'
  • 3,module build.gradle中
在defaultConfig闭包中
ndk{
    abiFilters "armeabi-v7a"
}

4.版本更新

  • V1.0.5
首次成功运行版本
  • V1.0.6
线程cpu占用率监控
  • V1.1.5
最新版本

lib_instrument_thread's People

Contributors

zhuyidian avatar

Stargazers

Jiaheng Tao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.