Coder Social home page Coder Social logo

yuhanx0728 / perfgenie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salesforce-misc/perfgenie

0.0 0.0 0.0 5.57 MB

License: BSD 3-Clause "New" or "Revised" License

JavaScript 2.99% Java 23.21% CSS 0.19% HTML 4.69% FreeMarker 46.14% Less 11.32% SCSS 11.46%

perfgenie's Introduction

perfGenie

License

perfGenie is a Java flight recorder(JFR) format profile and Jstack parsing and web visualization tool. 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 the form of 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. Request timeline view helps in looking at samples of an individual request context. It also has the option to visualize thread context request and context metric timeline views. The aggregation feature helps in combining profiles for a longer period. Thread dumps can also be converted into supported profile views.

Continuous 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

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-0.0.1-SNAPSHOT.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), Jstack (.jstack) files available at /tmp/jfrs/

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

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

Features

  • Tree view (backtrace, calltree and compare view)
  • Samples explorer view (grouping samples by tid, thread name and custom event context dimensions)
  • Flame graph view (backtrace, calltree 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 profile
  • Thread request view (based on custom events)
  • Metric timeline view (based on custom event metrics)
  • Request timeline view (to see samples of single 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

Work in progress

Flame graph compare view

Work in progress

Thread state view

River view (Experimental stack trace timeline view)

Hotspot surface view (Experimental stack trace timeline view)

perfgenie's People

Contributors

rpulle avatar ajayborra avatar yuhan-xiao 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.