Coder Social home page Coder Social logo

davidminor / java-thread-dump-grapher Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 5.0 116 KB

Poor man's java performance analysis - generates (via graphviz) a picture of your Java call graph using a series of thread dumps as input, from which you can identify your bottlenecks.

Home Page: http://github.com/davidminor/java-thread-dump-grapher

License: Apache License 2.0

Shell 3.69% Ruby 96.31%

java-thread-dump-grapher's Introduction

Poor man's java performance analysis:

1. Set up a script to issue "kill -3" to your production java server every 10 
   seconds or so. This generates thread dumps in the log file.

2. Run the log file through the thread_dump.rb script: 
   "ruby thread_dump.rb log_file intermediate_file"

3. Run the intermediate file from step 2 through thread_graph.rb: 
   "ruby thread_graph.rb intermediate_file output_file.dot"

4. Run the dot file from step 3 through graphviz's dot: 
   "dot -Tpdf output_file.dot -o output_file.pdf"

There are some constants at the beginning of threaddump.rb and threadgraph.rb 
to determine which stack traces are included, which stack frames are skipped, 
which branches are graphed, and what colors are used. This is helpful if
your thread dumps contain too much data for a single graph.

There is also script to generate a simple csv file via the intermediate file:
"ruby thread_csv.rb intermediate_file output_file.csv"

Tested with ruby 1.8.6 and thread dumps from Sun/Oracle's JVM.

This project is licensed under the Apache License 2.0. See LICENSE for
details.

java-thread-dump-grapher's People

Contributors

davidminor avatar nicolas-raoul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.