Git Product home page Git Product logo

perfgenie's Introduction

perfGenie

License

perfGenie is a continuous low overhead contextual profiling solution that can parse and visualize Java flight recorder(JFR) format profile and Jstacks. JFR profiles can be created using Java machine control(JMC), Java flight recorder, Async-profiler, or jcmd. It provides the ability to view profiles in context trees, samples explorer, flame Graph, thread state, river, and hotspot surface views. It helps to compare two profiles using context tree diff or flame graph diff views. It also provides functionality to filter profiles for a given custom event context, tid or thread name, etc. The request timeline view helps look at samples of a particular request context. It also can visualize thread context requests and context metric timeline views. The aggregation feature allows for combining profiles for a more extended period. Thread dumps can also be converted into supported profile views.

Continuous low overhead contextual profiling ✨

perfGenie can be deployed as a continuous profiling solution. It uses Cantor (https://github.com/salesforce/cantor) as a data layer. Cantor can be configured to store data in H2, MySQL, or S3. This project is set up with a simple cron job to monitor a directory for any JFR files, parse and store in H2 (default configuration).

Development

Create a new Fork and Clone the repository

$ git clone [email protected]:salesforce-misc/perfGenie.git

Build

$ export JAVA_HOME=<jdk home path>
$ mvn clean install

Config

add profiles and custom events to be parsed in config.properties file

ex:
customevents=LogContext;MqFrm;CPUEvent;MemoryEvent
profiles=ExecutionS;Socket
jfrdir=/tmp/jfrs
tenant=dev
h2dir=/tmp/h2.db

Start application server

$ java -jar perfgenie/target/perfgenie.jar

Access URL http://localhost:8080

How to add JFR's for testing

The application server has a cron job to monitor and parse JFR (*.jfr or .jfr.gz), and Jstack (.jstack) files available at /tmp/jfrs/

Note: example files provided in the examples directory can be copied into jfrdir for testing

Note: refer simulator module to generate a sample jfr with custom events added

Agent mode

$ java -jar agent/target/agent.jar

Agent to monitor and parse JFR (*.jfr or .jfr.gz), and Jstack (.jstack) files available at /tmp/agent/jfrs/

Features

  • Tree view (backtrace, call tree, and compare view)
  • Samples explorer view (grouping samples by tid, thread name, and custom event context dimensions)
  • Flame graph view (backtrace, call tree, and compare view)
  • Thread state view (This view is supported for thread dumps)
  • River view (Stack trace timeline view)
  • Hotspot surface (3D Stacktrace timeline view)
  • Custom event table view
  • Custom event context filters on the profile
  • Thread request view (based on custom events)
  • Metric timeline view (based on custom event metrics)
  • Request timeline view (to see samples of particular request)

User interface:

Context Filters

Context table view

Request samples view

Thread request view

Metric timeline view

Profile views

Calling context tree

Calling context tree compare view

Samples explorer

Flame graph compare view

Thread state view

River view (Experimental stack trace timeline view)

Hotspot surface view (Experimental stack trace timeline view)

perfgenie's People

Contributors

ajayborra avatar harithamayakuntla avatar komalkumarb avatar polakala avatar pradeepputtupu avatar rpulle avatar yuhan-xiao avatar

Stargazers

 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.