GithubHelp home page GithubHelp logo

lighttrace's Introduction

lightTrace

功能点

  1. 可以获取某个类的方法执行时间
  2. 代码中如果有system.gc的调用会打印出调用的堆栈

使用场景

应用整体响应时间长,但不知道方法是有多慢。一旦重启就再难复现。代码中有system.gc还不好排查,例如是第三方的包中调用。

使用方式

  1. 进入lightTrace目录下,可以查看到有Run.bat
  2. jps查看java进程id
  3. Run.bat pid 要查看方法的类,例如Run.bat 30232 Bean 表示进程号为30232的进程,类名里包含bean的类输出方法的执行时间。
  4. Run.bat pid 就只查看gc调用栈

注意

  1. 现在只提供了windows的脚本,如果linux就自己java执行吧
  2. 需要有JAVA_HOME的环境变量

lighttrace's People

Contributors

xpbob avatar

Watchers

 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.